From 7c5603b2fed27be86982665a8b10dcd8f1c5a483 Mon Sep 17 00:00:00 2001 From: salmonik Date: Sat, 1 Aug 2026 03:47:51 +0200 Subject: Bump workspace to edition 2024 - edition = "2024" in the workspace manifest and rsdosedit - extern blocks must be unsafe: interrupts.rs ISR stubs -> unsafe extern "C" - #[no_mangle] -> #[unsafe(no_mangle)] (efi_main, isr_dispatch) - One missed static-mut read in free_list_insert wrapped in an explicit unsafe block (edition 2024 removed the implicit unsafe context inside unsafe fns) - rustfmt reflows for 2024: nested if-lets become let-chains, imports re-sorted, rsdosedit help-screen box rows wrapped No codegen-affecting changes. Validated: cargo check/clippy/fmt clean (host + uefi target), make test-disk PASS, editor round-trip PASS. --- rsnix/src/fs.rs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'rsnix/src/fs.rs') diff --git a/rsnix/src/fs.rs b/rsnix/src/fs.rs index 2a1a3e3..a71e51a 100644 --- a/rsnix/src/fs.rs +++ b/rsnix/src/fs.rs @@ -92,10 +92,10 @@ fn add(name: &str, parent: Option, kind: FileType, data: NodeData) -> usi data, removed: false, }); - if let Some(p) = parent { - if let NodeData::Dir(v) = &mut nodes()[p].data { - v.push(h); - } + if let Some(p) = parent + && let NodeData::Dir(v) = &mut nodes()[p].data + { + v.push(h); } h } @@ -224,7 +224,7 @@ pub fn resolve(path: &str) -> Option { return None; } let mut cur = 0usize; // root - // (vol, cluster, parent, name) of directories descended into under /disk. + // (vol, cluster, parent, name) of directories descended into under /disk. let mut dstack: Vec<(usize, u32, u32, String)> = Vec::new(); for seg in path.split('/') { match seg { -- cgit v1.2.3