Bump edition to 2024, cargo fmt
This commit is contained in:
+1
-1
@@ -1,4 +1,4 @@
|
||||
use anyhow::{anyhow, Result};
|
||||
use anyhow::{Result, anyhow};
|
||||
use codepage_437::CP437_WINGDINGS;
|
||||
|
||||
// Serialize multi-line content with CR-terminated lines
|
||||
|
||||
+3
-1
@@ -25,7 +25,9 @@ fn main() -> Result<(), Box<dyn Error>> {
|
||||
|
||||
// Prepare to evaluate macros from the world file's directory
|
||||
let world_pathbuf = PathBuf::from(&world_filename);
|
||||
let world_dir = world_pathbuf.parent().ok_or(anyhow!("Couldn't get world's directory"))?;
|
||||
let world_dir = world_pathbuf
|
||||
.parent()
|
||||
.ok_or(anyhow!("Couldn't get world's directory"))?;
|
||||
let eval_context = Context::new(&world_dir);
|
||||
|
||||
println!("num boards: {}", &world.boards.len());
|
||||
|
||||
@@ -1,9 +1,12 @@
|
||||
use std::{fs, path::{Path, PathBuf}};
|
||||
use std::{
|
||||
fs,
|
||||
path::{Path, PathBuf},
|
||||
};
|
||||
|
||||
use anyhow::{anyhow, bail, Result};
|
||||
use anyhow::{Result, anyhow, bail};
|
||||
|
||||
use super::{
|
||||
parse::{parse, Expr},
|
||||
parse::{Expr, parse},
|
||||
scan::scan,
|
||||
};
|
||||
|
||||
@@ -41,7 +44,7 @@ impl Context {
|
||||
pub fn new(working_directory: &Path) -> Self {
|
||||
Context {
|
||||
file_loader: Box::new(FileLoader {
|
||||
working_dir: working_directory.into()
|
||||
working_dir: working_directory.into(),
|
||||
}),
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
use anyhow::{anyhow, Result};
|
||||
use anyhow::{Result, anyhow};
|
||||
|
||||
use super::scan::Token;
|
||||
|
||||
|
||||
+2
-2
@@ -1,13 +1,13 @@
|
||||
use std::{error::Error, fmt::Display};
|
||||
|
||||
use nom::{
|
||||
Err, IResult, Parser,
|
||||
bytes::complete::{tag, take},
|
||||
combinator::fail,
|
||||
error::{ErrorKind, ParseError},
|
||||
multi::count,
|
||||
number::complete::{le_i16, le_u16, le_u8},
|
||||
number::complete::{le_i16, le_u8, le_u16},
|
||||
sequence::tuple,
|
||||
Err, IResult, Parser,
|
||||
};
|
||||
|
||||
#[derive(Debug)]
|
||||
|
||||
Reference in New Issue
Block a user