diff --git a/Cargo.lock b/Cargo.lock index bb3dd7f..57b468b 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -167,9 +167,9 @@ dependencies = [ [[package]] name = "bumpalo" -version = "3.16.0" +version = "3.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "79296716171880943b8470b5f8d03aa55eb2e645a4874bdbb28adb49162e012c" +checksum = "46c5e41b57b8bba42a04676d81cb89e9ee8e859a1a66f80a5a72e1cb76b34d43" [[package]] name = "byteorder" @@ -179,9 +179,9 @@ checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" [[package]] name = "bytes" -version = "1.7.2" +version = "1.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "428d9aa8fbc0670b7b8d6030a7fadd0f86151cae55e4dbbece15f3780a3dfaf3" +checksum = "d71b6127be86fdcfddb610f7182ac57211d4b18a3e9c82eb2d17662f2227ad6a" [[package]] name = "bzip2" @@ -365,7 +365,7 @@ dependencies = [ "enable-ansi-support", "encoding_rs", "filetime", - "fixedbitset 0.5.7", + "fixedbitset", "flagset", "glob", "hex", @@ -480,9 +480,9 @@ dependencies = [ [[package]] name = "fastrand" -version = "2.1.1" +version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e8c02a5121d4ea3eb16a80748c74f5549a5665e4c21333c6098f283870fbdea6" +checksum = "37909eebbb50d72f9059c3b6d82c0463f2ff062c9e95845c43a6c9c0355411be" [[package]] name = "filetime" @@ -496,12 +496,6 @@ dependencies = [ "windows-sys 0.59.0", ] -[[package]] -name = "fixedbitset" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0ce7134b9999ecaf8bcd65542e436736ef32ddca1b3e06094cb6ec5755203b80" - [[package]] name = "fixedbitset" version = "0.5.7" @@ -697,10 +691,11 @@ dependencies = [ [[package]] name = "js-sys" -version = "0.3.72" +version = "0.3.78" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6a88f1bda2bd75b0452a14784937d796722fdebfe50df998aeb3f0b7603019a9" +checksum = "0c0b063578492ceec17683ef2f8c5e89121fbd0b172cbc280635ab7567db2738" dependencies = [ + "once_cell", "wasm-bindgen", ] @@ -781,11 +776,11 @@ checksum = "a7a70ba024b9dc04c27ea2f0c0548feb474ec5c54bba33a7f72f873a39d07b24" [[package]] name = "matchers" -version = "0.1.0" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8263075bb86c5a1b1427b5ae862e8889656f126e9f77c484496e8b47cf5c5558" +checksum = "d1525a2a28c7f4fa0fc98bb91ae755d1e2d1505079e05539e35bc876b5d65ae9" dependencies = [ - "regex-automata 0.1.10", + "regex-automata", ] [[package]] @@ -911,12 +906,11 @@ dependencies = [ [[package]] name = "nu-ansi-term" -version = "0.46.0" +version = "0.50.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77a8165726e8236064dbb45459242600304b42a5ea24ee2948e18e023bf7ba84" +checksum = "d4a28e057d01f97e61255210fcff094d74ed0466038633e95017f5beb68e4399" dependencies = [ - "overload", - "winapi", + "windows-sys 0.52.0", ] [[package]] @@ -1018,12 +1012,6 @@ dependencies = [ "snafu", ] -[[package]] -name = "overload" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b15813163c1d831bf4a13c3610c05c0d03b39feb07f7e09fa234dac9b15aaf39" - [[package]] name = "owo-colors" version = "4.1.0" @@ -1071,11 +1059,11 @@ dependencies = [ [[package]] name = "petgraph" -version = "0.6.5" +version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b4c5cc86750666a3ed20bdaf5ca2a0344f9c67674cae0515bec2da16fbaa47db" +checksum = "3672b37090dbd86368a4145bc067582552b29c27377cad4e0a306c97f9bd7772" dependencies = [ - "fixedbitset 0.4.2", + "fixedbitset", "indexmap", ] @@ -1105,9 +1093,9 @@ checksum = "be8e5b9d48ab30323e8ece6d655d20fc16a570e4f1af0de6890d3e9ebd284ba0" [[package]] name = "prettyplease" -version = "0.2.22" +version = "0.2.34" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "479cf940fbbb3426c32c5d5176f62ad57549a0bb84773423ba8be9d089f5faba" +checksum = "6837b9e10d61f45f987d50808f83d1ee3d206c66acf650c3e4ae2e1f6ddedf55" dependencies = [ "proc-macro2", "syn 2.0.101", @@ -1133,9 +1121,9 @@ dependencies = [ [[package]] name = "prost" -version = "0.13.3" +version = "0.13.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b0487d90e047de87f984913713b85c601c05609aad5b0df4b4573fbf69aa13f" +checksum = "2796faa41db3ec313a31f7624d9286acf277b52de526150b7e69f3debf891ee5" dependencies = [ "bytes", "prost-derive", @@ -1143,11 +1131,10 @@ dependencies = [ [[package]] name = "prost-build" -version = "0.13.3" +version = "0.13.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c1318b19085f08681016926435853bbf7858f9c082d0999b80550ff5d9abe15" +checksum = "be769465445e8c1474e9c5dac2018218498557af32d9ed057325ec9a41ae81bf" dependencies = [ - "bytes", "heck", "itertools", "log", @@ -1164,9 +1151,9 @@ dependencies = [ [[package]] name = "prost-derive" -version = "0.13.3" +version = "0.13.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e9552f850d5f0964a4e4d0bf306459ac29323ddfbae05e35a7c0d35cb0803cc5" +checksum = "8a56d757972c98b346a9b766e3f02746cde6dd1cd1d1d563472929fdd74bec4d" dependencies = [ "anyhow", "itertools", @@ -1177,9 +1164,9 @@ dependencies = [ [[package]] name = "prost-types" -version = "0.13.3" +version = "0.13.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4759aa0d3a6232fb8dbdb97b61de2c20047c68aca932c7ed76da9d788508d670" +checksum = "52c2c1bf36ddb1a1c396b3601a3cec27c2462e45f07c386894ec3ccf5332bd16" dependencies = [ "prost", ] @@ -1252,17 +1239,8 @@ checksum = "38200e5ee88914975b69f657f0801b6f6dccafd44fd9326302a4aaeecfacb1d8" dependencies = [ "aho-corasick", "memchr", - "regex-automata 0.4.8", - "regex-syntax 0.8.5", -] - -[[package]] -name = "regex-automata" -version = "0.1.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c230d73fb8d8c1b9c0b3135c5142a8acee3a0558fb8db5cf1cb65f8d7862132" -dependencies = [ - "regex-syntax 0.6.29", + "regex-automata", + "regex-syntax", ] [[package]] @@ -1273,15 +1251,9 @@ checksum = "368758f23274712b504848e9d5a6f010445cc8b87a7cdb4d7cbee666c1288da3" dependencies = [ "aho-corasick", "memchr", - "regex-syntax 0.8.5", + "regex-syntax", ] -[[package]] -name = "regex-syntax" -version = "0.6.29" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f162c6dd7b008981e4d40210aca20b4bd0f9b60ca9271061b07f78537722f2e1" - [[package]] name = "regex-syntax" version = "0.8.5" @@ -1605,7 +1577,7 @@ dependencies = [ "flate2", "fnv", "once_cell", - "regex-syntax 0.8.5", + "regex-syntax", "serde", "serde_derive", "serde_json", @@ -1695,9 +1667,9 @@ dependencies = [ [[package]] name = "tracing" -version = "0.1.40" +version = "0.1.41" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3523ab5a71916ccf420eebdf5521fcef02141234bbc0b8a49f2fdc4544364ef" +checksum = "784e0ac535deb450455cbfa28a6f0df145ea1bb7ae51b821cf5e7927fdcfbdd0" dependencies = [ "pin-project-lite", "tracing-attributes", @@ -1706,9 +1678,9 @@ dependencies = [ [[package]] name = "tracing-attributes" -version = "0.1.27" +version = "0.1.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" +checksum = "81383ab64e72a7a8b8e13130c49e3dab29def6d0c7d76a03087b3cf71c5c6903" dependencies = [ "proc-macro2", "quote", @@ -1717,9 +1689,9 @@ dependencies = [ [[package]] name = "tracing-core" -version = "0.1.32" +version = "0.1.34" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c06d3da6113f116aaee68e4d601191614c9053067f9ab7f6edbcb161237daa54" +checksum = "b9d12581f227e93f094d3af2ae690a574abb8a2b9b7a96e7cfe9647b2b617678" dependencies = [ "once_cell", "valuable", @@ -1738,14 +1710,14 @@ dependencies = [ [[package]] name = "tracing-subscriber" -version = "0.3.18" +version = "0.3.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ad0f048c97dbd9faa9b7df56362b8ebcaa52adb06b498c050d2f4e32f90a7a8b" +checksum = "2054a14f5307d601f88daf0553e1cbf472acc4f2c51afab632431cdcd72124d5" dependencies = [ "matchers", "nu-ansi-term", "once_cell", - "regex", + "regex-automata", "sharded-slab", "smallvec", "thread_local", @@ -1756,9 +1728,9 @@ dependencies = [ [[package]] name = "tsify-next" -version = "0.5.4" +version = "0.5.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2f4a645dca4ee0800f5ab60ce166deba2db6a0315de795a2691e138a3d55d756" +checksum = "7d0f2208feeb5f7a6edb15a2389c14cd42480ef6417318316bb866da5806a61d" dependencies = [ "serde", "serde-wasm-bindgen", @@ -1768,9 +1740,9 @@ dependencies = [ [[package]] name = "tsify-next-macros" -version = "0.5.4" +version = "0.5.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0d5c06f8a51d759bb58129e30b2631739e7e1e4579fad1f30ac09a6c88e488a6" +checksum = "f81253930d0d388a3ab8fa4ae56da9973ab171ef833d1be2e9080fc3ce502bd6" dependencies = [ "proc-macro2", "quote", @@ -1853,24 +1825,25 @@ checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" [[package]] name = "wasm-bindgen" -version = "0.2.95" +version = "0.2.101" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "128d1e363af62632b8eb57219c8fd7877144af57558fb2ef0368d0087bddeb2e" +checksum = "7e14915cadd45b529bb8d1f343c4ed0ac1de926144b746e2710f9cd05df6603b" dependencies = [ "cfg-if", "once_cell", + "rustversion", "wasm-bindgen-macro", + "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-backend" -version = "0.2.95" +version = "0.2.101" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cb6dd4d3ca0ddffd1dd1c9c04f94b868c37ff5fac97c30b97cff2d74fce3a358" +checksum = "e28d1ba982ca7923fd01448d5c30c6864d0a14109560296a162f80f305fb93bb" dependencies = [ "bumpalo", "log", - "once_cell", "proc-macro2", "quote", "syn 2.0.101", @@ -1879,9 +1852,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro" -version = "0.2.95" +version = "0.2.101" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e79384be7f8f5a9dd5d7167216f022090cf1f9ec128e6e6a482a2cb5c5422c56" +checksum = "7c3d463ae3eff775b0c45df9da45d68837702ac35af998361e2c84e7c5ec1b0d" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -1889,9 +1862,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.95" +version = "0.2.101" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26c6ab57572f7a24a4985830b120de1594465e5d500f24afe89e16b4e833ef68" +checksum = "7bb4ce89b08211f923caf51d527662b75bdc9c9c7aab40f86dcb9fb85ac552aa" dependencies = [ "proc-macro2", "quote", @@ -1902,9 +1875,12 @@ dependencies = [ [[package]] name = "wasm-bindgen-shared" -version = "0.2.95" +version = "0.2.101" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "65fc09f10666a9f147042251e0dda9c18f166ff7de300607007e96bdebc1068d" +checksum = "f143854a3b13752c6950862c906306adb27c7e839f7414cec8fea35beab624c1" +dependencies = [ + "unicode-ident", +] [[package]] name = "winapi" @@ -1928,7 +1904,7 @@ version = "0.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cf221c93e13a30d793f7645a0e7762c55d169dbb0a49671918a2319d289b10bb" dependencies = [ - "windows-sys 0.59.0", + "windows-sys 0.52.0", ] [[package]] diff --git a/deny.toml b/deny.toml index ebfc402..12b93d4 100644 --- a/deny.toml +++ b/deny.toml @@ -75,12 +75,14 @@ ignore = [ #"a-crate-that-is-yanked@0.1.1", # you can also ignore yanked crate versions if you wish #{ crate = "a-crate-that-is-yanked@0.1.1", reason = "you can specify why you are ignoring the yanked crate" }, { id = "RUSTSEC-2024-0384", reason = "unmaintained transient dependency, will be updated in next nod version" }, + { id = "RUSTSEC-2025-0056", reason = "adler crate used via nodtool has no maintained alternative yet" }, + { id = "RUSTSEC-2025-0048", reason = "tsify-next is unmaintained but required by objdiff-core" }, ] # If this is true, then cargo deny will use the git executable to fetch advisory database. # If this is false, then it uses a built-in git library. # Setting this to true can be helpful if you have special authentication requirements that cargo-deny does not support. # See Git Authentication for more information about setting up git authentication. -#git-fetch-with-cli = true +git-fetch-with-cli = true # This section is considered when running `cargo deny check licenses` # More documentation for the licenses section can be found here: diff --git a/src/cmd/rel.rs b/src/cmd/rel.rs index 8e1cb09..adbf28c 100644 --- a/src/cmd/rel.rs +++ b/src/cmd/rel.rs @@ -123,7 +123,7 @@ pub fn run(args: Args) -> Result<()> { } } -fn load_obj(buf: &[u8]) -> Result { +fn load_obj(buf: &[u8]) -> Result> { let obj = File::parse(buf)?; match obj.architecture() { Architecture::PowerPc => {} diff --git a/src/util/file.rs b/src/util/file.rs index 8734a76..cd8e437 100644 --- a/src/util/file.rs +++ b/src/util/file.rs @@ -144,7 +144,7 @@ pub fn touch(path: &Utf8NativePath) -> io::Result<()> { } } -pub fn decompress_if_needed(buf: &[u8]) -> Result { +pub fn decompress_if_needed(buf: &[u8]) -> Result> { if buf.len() > 4 { match *array_ref!(buf, 0, 4) { YAZ0_MAGIC => return decompress_yaz0(buf).map(Bytes::Owned), diff --git a/src/util/rarc.rs b/src/util/rarc.rs index 3750dec..ad957e7 100644 --- a/src/util/rarc.rs +++ b/src/util/rarc.rs @@ -200,7 +200,7 @@ impl<'a> RarcView<'a> { } /// Get a string from the string table at the given offset. - pub fn get_string(&self, offset: u32) -> Result, String> { + pub fn get_string(&self, offset: u32) -> Result, String> { let name_buf = self.string_table.get(offset as usize..).ok_or_else(|| { format!( "RARC: name offset {} out of bounds (string table size: {})", diff --git a/src/util/u8_arc.rs b/src/util/u8_arc.rs index 04f1b7d..3426f6c 100644 --- a/src/util/u8_arc.rs +++ b/src/util/u8_arc.rs @@ -121,10 +121,10 @@ impl<'a> U8View<'a> { } /// Iterate over the nodes in the U8 archive. - pub fn iter(&self) -> U8Iter { U8Iter { inner: self, idx: 1 } } + pub fn iter(&self) -> U8Iter<'_> { U8Iter { inner: self, idx: 1 } } /// Get the name of a node. - pub fn get_name(&self, node: U8Node) -> Result, String> { + pub fn get_name(&self, node: U8Node) -> Result, String> { let name_buf = self.string_table.get(node.name_offset() as usize..).ok_or_else(|| { format!( "U8: name offset {} out of bounds (string table size: {})", diff --git a/src/vfs/disc.rs b/src/vfs/disc.rs index 20d39f1..26cb88f 100644 --- a/src/vfs/disc.rs +++ b/src/vfs/disc.rs @@ -47,7 +47,7 @@ impl DiscFs { Ok(Self { disc, base, meta, mtime }) } - fn find(&self, path: &Utf8UnixPath) -> VfsResult { + fn find(&self, path: &Utf8UnixPath) -> VfsResult> { let path = path.as_str().trim_matches('/'); let mut split = path.split('/'); let mut segment = next_non_empty(&mut split); diff --git a/src/vfs/rarc.rs b/src/vfs/rarc.rs index 243a14d..0f5eb27 100644 --- a/src/vfs/rarc.rs +++ b/src/vfs/rarc.rs @@ -13,7 +13,7 @@ pub struct RarcFs { impl RarcFs { pub fn new(file: Box) -> io::Result { Ok(Self { file }) } - fn view(&mut self) -> io::Result { + fn view(&mut self) -> io::Result> { let data = self.file.map()?; RarcView::new(data).map_err(|e| io::Error::new(io::ErrorKind::InvalidData, e)) } diff --git a/src/vfs/u8_arc.rs b/src/vfs/u8_arc.rs index ca8ed68..4c177e5 100644 --- a/src/vfs/u8_arc.rs +++ b/src/vfs/u8_arc.rs @@ -13,7 +13,7 @@ pub struct U8Fs { impl U8Fs { pub fn new(file: Box) -> io::Result { Ok(Self { file }) } - fn view(&mut self) -> io::Result { + fn view(&mut self) -> io::Result> { let data = self.file.map()?; U8View::new(data).map_err(|e| io::Error::new(io::ErrorKind::InvalidData, e)) } diff --git a/src/vfs/wad.rs b/src/vfs/wad.rs index f657f70..a438f4d 100644 --- a/src/vfs/wad.rs +++ b/src/vfs/wad.rs @@ -41,7 +41,7 @@ impl WadFs { Ok(Self { file, wad, mtime }) } - fn find(&self, path: &str) -> Option { + fn find(&self, path: &str) -> Option> { let filename = path.trim_start_matches('/'); if filename.contains('/') { return None;