Bump edition to 2024, cargo fmt

This commit is contained in:
2025-04-07 11:09:45 -07:00
parent 622b7d0b3a
commit 58293ed625
6 changed files with 15 additions and 10 deletions
+1 -1
View File
@@ -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
View File
@@ -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());
+7 -4
View File
@@ -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 -1
View File
@@ -1,4 +1,4 @@
use anyhow::{anyhow, Result};
use anyhow::{Result, anyhow};
use super::scan::Token;
+2 -2
View File
@@ -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)]