diff options
| author | salmonik <salmonik@tuta.io> | 2026-08-01 03:47:51 +0200 |
|---|---|---|
| committer | salmonik <salmonik@tuta.io> | 2026-08-01 03:47:51 +0200 |
| commit | 7c5603b2fed27be86982665a8b10dcd8f1c5a483 (patch) | |
| tree | e808380c9411c1847ff12aa2a35c94776b1f5292 /rsnix/src/fs.rs | |
| parent | Clean up warnings, fix FAT32 multi-cluster dirs, prep for edition 2024 (diff) | |
| download | rs-dos-7c5603b2fed27be86982665a8b10dcd8f1c5a483.tar.gz rs-dos-7c5603b2fed27be86982665a8b10dcd8f1c5a483.zip | |
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.
Diffstat (limited to 'rsnix/src/fs.rs')
| -rw-r--r-- | rsnix/src/fs.rs | 10 |
1 files changed, 5 insertions, 5 deletions
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<usize>, kind: FileType, data: NodeData) -> usi | |||
| 92 | data, | 92 | data, |
| 93 | removed: false, | 93 | removed: false, |
| 94 | }); | 94 | }); |
| 95 | if let Some(p) = parent { | 95 | if let Some(p) = parent |
| 96 | if let NodeData::Dir(v) = &mut nodes()[p].data { | 96 | && let NodeData::Dir(v) = &mut nodes()[p].data |
| 97 | v.push(h); | 97 | { |
| 98 | } | 98 | v.push(h); |
| 99 | } | 99 | } |
| 100 | h | 100 | h |
| 101 | } | 101 | } |
| @@ -224,7 +224,7 @@ pub fn resolve(path: &str) -> Option<usize> { | |||
| 224 | return None; | 224 | return None; |
| 225 | } | 225 | } |
| 226 | let mut cur = 0usize; // root | 226 | let mut cur = 0usize; // root |
| 227 | // (vol, cluster, parent, name) of directories descended into under /disk. | 227 | // (vol, cluster, parent, name) of directories descended into under /disk. |
| 228 | let mut dstack: Vec<(usize, u32, u32, String)> = Vec::new(); | 228 | let mut dstack: Vec<(usize, u32, u32, String)> = Vec::new(); |
| 229 | for seg in path.split('/') { | 229 | for seg in path.split('/') { |
| 230 | match seg { | 230 | match seg { |
