From 6333dc7ee02332cd06e20b56cefd3210368e54f8 Mon Sep 17 00:00:00 2001 From: Miquel Sabaté Solà Date: Wed, 8 Jul 2026 20:45:05 +0200 Subject: Upgrade to the 2024 edition of Rust MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit And also adjust the code so the clippy from the 2024 edition is fine with it. Signed-off-by: Miquel Sabaté Solà --- crates/nasm/Cargo.toml | 2 +- crates/nasm/src/main.rs | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) (limited to 'crates/nasm') diff --git a/crates/nasm/Cargo.toml b/crates/nasm/Cargo.toml index f1294f7..b204a33 100644 --- a/crates/nasm/Cargo.toml +++ b/crates/nasm/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "nasm" version = "0.1.0" -edition = "2021" +edition = "2024" authors = ["Miquel Sabaté Solà "] [dependencies] diff --git a/crates/nasm/src/main.rs b/crates/nasm/src/main.rs index 9f44620..4ec4f59 100644 --- a/crates/nasm/src/main.rs +++ b/crates/nasm/src/main.rs @@ -207,11 +207,10 @@ fn find_git_directory(source: &SourceInfo) -> PathBuf { fn get_directory_from_source(source: &SourceInfo) -> PathBuf { let dir = find_git_directory(source).join(".nasm"); - if !dir.exists() { - if let Err(e) = create_dir(&dir) { + if !dir.exists() + && let Err(e) = create_dir(&dir) { die(e.to_string()); } - } dir } -- cgit v1.2.3