From fb2bd3078e764acf2df6cc1e747aa6f156fe7458 Mon Sep 17 00:00:00 2001 From: Abdelkader Boudih Date: Thu, 1 Jan 2026 12:46:50 +0100 Subject: [PATCH 1/2] fix: upgrade dependencies for FreeBSD 15+ compatibility MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Upgrades several dependencies with breaking API changes: - nix 0.26.2 → 0.30.1 (FreeBSD 15+ support) - thiserror 1.0 → 2.0 - toml 0.7 → 0.9 - which 4.4 → 8.0 - const-sha1 0.2 → 0.3 - signal-hook 0.3 → 0.4 - directories 4.0 → 6.0 API migrations: - nix: errno() → Errno::last_raw(), from_i32() → from_raw() - const-sha1: ConstBuffer removed, use sha1() directly - toml: Deserializer::new() → Deserializer::parse() - which: enable default features for real-sys support --- Cargo.lock | 730 ++++++++++++++++++++++++++++--------------- Cargo.toml | 14 +- src/cross_toml.rs | 2 +- src/docker/shared.rs | 3 +- src/id.rs | 6 +- src/rustc.rs | 3 +- 6 files changed, 494 insertions(+), 264 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 7b794798c..c9ceb66f7 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4,9 +4,9 @@ version = 3 [[package]] name = "addr2line" -version = "0.24.2" +version = "0.25.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dfbe277e56a376000877090da837660b4427aad530e3028d44e0bffe4f89a1c1" +checksum = "1b5d307320b3181d6d7954e663bd7c774a838b8220fe0593c86d9fb09f498b4b" dependencies = [ "gimli", ] @@ -19,19 +19,13 @@ checksum = "320119579fcad9c21884f5c4861d16174d0e06250625266f50fe6898340abefa" [[package]] name = "aho-corasick" -version = "1.1.3" +version = "1.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e60d3430d3a69478ad0993f19238d2df97c507009a52b3c10addcd7f6bcb916" +checksum = "ddd31a130427c27518df266943a5308ed92d4b226cc639f5a8f1002816174301" dependencies = [ "memchr", ] -[[package]] -name = "android-tzdata" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e999941b234f3131b00bc13c22d06e8c5ff726d1b6318ac7eb276997bbb4fef0" - [[package]] name = "android_system_properties" version = "0.1.5" @@ -43,63 +37,65 @@ dependencies = [ [[package]] name = "anstream" -version = "0.6.13" +version = "0.6.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d96bd03f33fe50a863e394ee9718a706f988b9079b20c3784fb726e7678b62fb" +checksum = "43d5b281e737544384e969a5ccad3f1cdd24b48086a0fc1b2a5262a26b8f4f4a" dependencies = [ "anstyle", "anstyle-parse", "anstyle-query", "anstyle-wincon", "colorchoice", + "is_terminal_polyfill", "utf8parse", ] [[package]] name = "anstyle" -version = "1.0.6" +version = "1.0.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8901269c6307e8d93993578286ac0edf7f195079ffff5ebdeea6a59ffb7e36bc" +checksum = "5192cca8006f1fd4f7237516f40fa183bb07f8fbdfedaa0036de5ea9b0b45e78" [[package]] name = "anstyle-parse" -version = "0.2.3" +version = "0.2.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c75ac65da39e5fe5ab759307499ddad880d724eed2f6ce5b5e8a26f4f387928c" +checksum = "4e7644824f0aa2c7b9384579234ef10eb7efb6a0deb83f9630a49594dd9c15c2" dependencies = [ "utf8parse", ] [[package]] name = "anstyle-query" -version = "1.0.2" +version = "1.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e28923312444cdd728e4738b3f9c9cac739500909bb3d3c94b43551b16517648" +checksum = "40c48f72fd53cd289104fc64099abca73db4166ad86ea0b4341abe65af83dadc" dependencies = [ - "windows-sys", + "windows-sys 0.61.2", ] [[package]] name = "anstyle-wincon" -version = "3.0.2" +version = "3.0.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1cd54b81ec8d6180e24654d0b371ad22fc3dd083b6ff8ba325b72e00c87660a7" +checksum = "291e6a250ff86cd4a820112fb8898808a366d8f9f58ce16d1f538353ad55747d" dependencies = [ "anstyle", - "windows-sys", + "once_cell_polyfill", + "windows-sys 0.61.2", ] [[package]] name = "autocfg" -version = "1.2.0" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f1fdabc7756949593fe60f30ec81974b613357de856987752631dea1e3394c80" +checksum = "c08606f8c3cbf4ce6ec8e28fb0014a2c086708fe954eaa885384a6165172e7e8" [[package]] name = "backtrace" -version = "0.3.74" +version = "0.3.76" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8d82cb332cdfaed17ae235a638438ac4d4839913cc2af585c3c6746e8f8bee1a" +checksum = "bb531853791a215d7c62a30daf0dde835f381ab5de4589cfe7c649d2cbe92bd6" dependencies = [ "addr2line", "cfg-if", @@ -107,26 +103,20 @@ dependencies = [ "miniz_oxide", "object", "rustc-demangle", - "windows-targets", + "windows-link", ] [[package]] name = "bitflags" -version = "1.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" - -[[package]] -name = "bitflags" -version = "2.5.0" +version = "2.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf4b9d6a944f767f8e5e0db018570623c85f3d925ac718db4e06d0187adb21c1" +checksum = "812e12b5285cc515a9c72a5c1d3b6d46a19dac5acfef5265968c166106e31dd3" [[package]] name = "bstr" -version = "1.9.1" +version = "1.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05efc5cfd9110c8416e471df0e96702d58690178e206e61b7173706673c93706" +checksum = "63044e1ae8e69f3b5a92c736ca6269b8d12fa7efe39bf34ddb06d102cf0e2cab" dependencies = [ "memchr", "serde", @@ -134,41 +124,50 @@ dependencies = [ [[package]] name = "bumpalo" -version = "3.16.0" +version = "3.19.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "79296716171880943b8470b5f8d03aa55eb2e645a4874bdbb28adb49162e012c" +checksum = "5dd9dc738b7a8311c7ade152424974d8115f2cdad61e8dab8dac9f2362298510" [[package]] name = "cc" -version = "1.0.96" +version = "1.2.51" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "065a29261d53ba54260972629f9ca6bffa69bac13cd1fed61420f7fa68b9f8bd" +checksum = "7a0aeaff4ff1a90589618835a598e545176939b97874f7abc7851caa0618f203" +dependencies = [ + "find-msvc-tools", + "shlex", +] [[package]] name = "cfg-if" -version = "1.0.0" +version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" +checksum = "9330f8b2ff13f34540b44e946ef35111825727b38d33286ef986142615121801" + +[[package]] +name = "cfg_aliases" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "613afe47fcd5fac7ccf1db93babcb082c5994d996f20b8b159f2ad1658eb5724" [[package]] name = "chrono" -version = "0.4.38" +version = "0.4.42" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a21f936df1771bf62b77f047b726c4625ff2e8aa607c01ec06e5a05bd8463401" +checksum = "145052bdd345b87320e369255277e3fb5152762ad123a901ef5c262dd38fe8d2" dependencies = [ - "android-tzdata", "iana-time-zone", "js-sys", "num-traits", "wasm-bindgen", - "windows-targets", + "windows-link", ] [[package]] name = "clap" -version = "4.5.4" +version = "4.5.53" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "90bc066a67923782aa8515dbaea16946c5bcc5addbd668bb80af688e53e548a0" +checksum = "c9e340e012a1bf4935f5282ed1436d1489548e8f72308207ea5df0e23d2d03f8" dependencies = [ "clap_builder", "clap_derive", @@ -176,9 +175,9 @@ dependencies = [ [[package]] name = "clap_builder" -version = "4.5.2" +version = "4.5.53" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ae129e2e766ae0ec03484e609954119f123cc1fe650337e155d03b022f24f7b4" +checksum = "d76b5d13eaa18c901fd2f7fca939fefe3a0727a953561fefdf3b2922b8569d00" dependencies = [ "anstream", "anstyle", @@ -188,9 +187,9 @@ dependencies = [ [[package]] name = "clap_derive" -version = "4.5.4" +version = "4.5.49" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "528131438037fd55894f62d6e9f068b8f45ac57ffa77517819645d10aed04f64" +checksum = "2a0b5487afeab2deb2ff4e03a807ad1a03ac532ff5a2cee5d86884440c7f7671" dependencies = [ "heck", "proc-macro2", @@ -200,9 +199,9 @@ dependencies = [ [[package]] name = "clap_lex" -version = "0.7.0" +version = "0.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "98cc8fbded0c607b7ba9dd60cd98df59af97e84d24e49c8557331cfc26d301ce" +checksum = "a1d728cc89cf3aee9ff92b05e62b19ee65a02b5702cff7d5a377e32c6ae29d8d" [[package]] name = "color-eyre" @@ -233,21 +232,21 @@ dependencies = [ [[package]] name = "colorchoice" -version = "1.0.0" +version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "acbf1af155f9b9ef647e42cdc158db4b64a1b61f743629225fde6f3e0be2a7c7" +checksum = "b05b61dc5112cbb17e4b6cd61790d9845d13888356391624cbe7e41efeac1e75" [[package]] name = "const-sha1" -version = "0.2.0" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fb58b6451e8c2a812ad979ed1d83378caa5e927eef2622017a45f251457c2c9d" +checksum = "0d8a42181e0652c2997ae4d217f25b63c5337a52fd2279736e97b832fa0a3cff" [[package]] name = "core-foundation-sys" -version = "0.8.6" +version = "0.8.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "06ea2b9bc92be3c2baa9334a323ebca2d6f074ff852cd1d7b11064035cd3868f" +checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b" [[package]] name = "cross" @@ -278,17 +277,17 @@ dependencies = [ "signal-hook", "tempfile", "thiserror", - "toml", + "toml 0.9.10+spec-1.1.0", "walkdir", - "which", + "which 8.0.0", "winapi", ] [[package]] name = "crossbeam-deque" -version = "0.8.5" +version = "0.8.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "613f8cc01fe9cf1a3eb3d7f488fd2fa8388403e97039e2f73692932e291a770d" +checksum = "9dd111b7b7f7d55b72c0a6ae361660ee5853c9af73f70c3c2ef6858b950e2e51" dependencies = [ "crossbeam-epoch", "crossbeam-utils", @@ -305,56 +304,63 @@ dependencies = [ [[package]] name = "crossbeam-utils" -version = "0.8.19" +version = "0.8.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "248e3bacc7dc6baa3b21e405ee045c3047101a49145e7e9eca583ab4c2ca5345" +checksum = "d0a5c400df2834b80a4c3327b3aad3a4c4cd4de0629063962b03235697506a28" [[package]] name = "directories" -version = "4.0.1" +version = "6.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f51c5d4ddabd36886dd3e1438cb358cdcb0d7c499cb99cb4ac2e38e18b5cb210" +checksum = "16f5094c54661b38d03bd7e50df373292118db60b585c08a411c6d840017fe7d" dependencies = [ "dirs-sys", ] [[package]] name = "dirs-sys" -version = "0.3.7" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b1d1d91c932ef41c0f2663aa8b0ca0342d444d842c06914aa0a7e352d0bada6" +checksum = "e01a3366d27ee9890022452ee61b2b63a67e6f13f58900b651ff5665f0bb1fab" dependencies = [ "libc", + "option-ext", "redox_users", - "winapi", + "windows-sys 0.61.2", ] [[package]] name = "dunce" -version = "1.0.4" +version = "1.0.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "56ce8c6da7551ec6c462cbaf3bfbc75131ebbfa1c944aeaa9dab51ca1c5f0c3b" +checksum = "92773504d58c093f6de2459af4af33faa518c13451eb8f2b5698ed3d36e7c813" [[package]] name = "either" -version = "1.11.0" +version = "1.15.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a47c1c47d2f5964e29c61246e81db715514cd532db6b5116a25ea3c03d6780a2" +checksum = "48c757948c5ede0e46177b7add2e67155f70e33c07fea8284df6576da70b3719" + +[[package]] +name = "env_home" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c7f84e12ccf0a7ddc17a6c41c93326024c42920d7ee630d04950e6926645c0fe" [[package]] name = "equivalent" -version = "1.0.1" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" +checksum = "877a4ace8713b0bcf2a4e7eec82529c029f1d0619886d18145fea96c3ffe5c0f" [[package]] name = "errno" -version = "0.3.8" +version = "0.3.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a258e46cdc063eb8519c00b9fc845fc47bcfca4130e2f08e88665ceda8474245" +checksum = "39cab71617ae0d63f51a36d69f866391735b51691dbda63cf6f96d042b63efeb" dependencies = [ "libc", - "windows-sys", + "windows-sys 0.61.2", ] [[package]] @@ -369,32 +375,50 @@ dependencies = [ [[package]] name = "fastrand" -version = "2.1.0" +version = "2.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "37909eebbb50d72f9059c3b6d82c0463f2ff062c9e95845c43a6c9c0355411be" + +[[package]] +name = "find-msvc-tools" +version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9fc0510504f03c51ada170672ac806f1f105a88aa97a5281117e1ddc3368e51a" +checksum = "645cbb3a84e60b7531617d5ae4e57f7e27308f6445f5abf653209ea76dec8dff" [[package]] name = "getrandom" -version = "0.2.14" +version = "0.2.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "94b22e06ecb0110981051723910cbf0b5f5e09a2062dd7663334ee79a9d1286c" +checksum = "335ff9f135e4384c8150d6f27c6daed433577f86b4750418338c01a1a2528592" dependencies = [ "cfg-if", "libc", "wasi", ] +[[package]] +name = "getrandom" +version = "0.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "899def5c37c4fd7b2664648c28120ecec138e4d395b459e5ca34f9cce2dd77fd" +dependencies = [ + "cfg-if", + "libc", + "r-efi", + "wasip2", +] + [[package]] name = "gimli" -version = "0.31.1" +version = "0.32.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "07e28edb80900c19c28f1072f2e8aeca7fa06b23cd4169cefe1af5aa3260783f" +checksum = "e629b9b98ef3dd8afe6ca2bd0f89306cec16d43d907889945bc5d6687f2f13c7" [[package]] name = "globset" -version = "0.4.14" +version = "0.4.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "57da3b9b5b85bd66f31093f8c408b90a74431672542466497dcbdfdc02034be1" +checksum = "52dfc19153a48bde0cbd630453615c8151bce3a5adfac7a0aebfbf0a1e1f57e3" dependencies = [ "aho-corasick", "bstr", @@ -405,9 +429,9 @@ dependencies = [ [[package]] name = "hashbrown" -version = "0.14.5" +version = "0.16.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e5274423e17b7c9fc20b6e7e208532f9b19825d82dfd615708b70edd83df41f1" +checksum = "841d1cc9bed7f9236f321df977030373f4a4163ae1a7dbfe1a51a2c1a51d9100" [[package]] name = "heck" @@ -417,29 +441,30 @@ checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea" [[package]] name = "hermit-abi" -version = "0.3.9" +version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d231dfb89cfffdbc30e7fc41579ed6066ad03abda9e567ccafae602b97ec5024" +checksum = "fc0fef456e4baa96da950455cd02c081ca953b141298e41db3fc7e36b1da849c" [[package]] name = "home" -version = "0.5.9" +version = "0.5.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e3d1354bf6b7235cb4a0576c2619fd4ed18183f689b12b006a0ee7329eeff9a5" +checksum = "cc627f471c528ff0c4a49e1d5e60450c8f6461dd6d10ba9dcd3a61d3dff7728d" dependencies = [ - "windows-sys", + "windows-sys 0.61.2", ] [[package]] name = "iana-time-zone" -version = "0.1.60" +version = "0.1.64" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e7ffbb5a1b541ea2561f8c41c087286cc091e21e556a4f09a8f6cbf17b69b141" +checksum = "33e57f83510bb73707521ebaffa789ec8caf86f9657cad665b092b581d40e9fb" dependencies = [ "android_system_properties", "core-foundation-sys", "iana-time-zone-haiku", "js-sys", + "log", "wasm-bindgen", "windows-core", ] @@ -455,9 +480,9 @@ dependencies = [ [[package]] name = "ignore" -version = "0.4.22" +version = "0.4.25" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b46810df39e66e925525d6e38ce1e7f6e1d208f72dc39757880fcb66e2c58af1" +checksum = "d3d782a365a015e0f5c04902246139249abf769125006fbe7649e2ee88169b4a" dependencies = [ "crossbeam-deque", "globset", @@ -471,15 +496,15 @@ dependencies = [ [[package]] name = "indenter" -version = "0.3.3" +version = "0.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ce23b50ad8242c51a442f3ff322d56b02f08852c77e4c0b4d3fd684abc89c683" +checksum = "964de6e86d545b246d84badc0fef527924ace5134f30641c203ef52ba83f58d5" [[package]] name = "indexmap" -version = "2.2.6" +version = "2.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "168fb715dda47215e360912c096649d23d58bf392ac62f73919e831745e40f26" +checksum = "0ad4bb2b565bca0645f4d68c5c9af97fba094e9791da685bf83cb5f3ce74acf2" dependencies = [ "equivalent", "hashbrown", @@ -487,13 +512,13 @@ dependencies = [ [[package]] name = "is-terminal" -version = "0.4.12" +version = "0.4.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f23ff5ef2b80d608d61efee834934d862cd92461afc0560dedf493e4c033738b" +checksum = "3640c1c38b8e4e43584d8df18be5fc6b0aa314ce6ebf51b53313d4306cca8e46" dependencies = [ "hermit-abi", "libc", - "windows-sys", + "windows-sys 0.61.2", ] [[package]] @@ -502,60 +527,73 @@ version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7655c9839580ee829dfacba1d1278c2b7883e50a277ff7541299489d6bdfdc45" +[[package]] +name = "is_terminal_polyfill" +version = "1.70.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a6cb138bb79a146c1bd460005623e142ef0181e3d0219cb493e02f7d08a35695" + [[package]] name = "itoa" -version = "1.0.11" +version = "1.0.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49f1f14873335454500d59611f1cf4a4b0f786f9ac11f4312a78e4cf2566695b" +checksum = "92ecc6618181def0457392ccd0ee51198e065e016d1d527a7ac1b6dc7c1f09d2" [[package]] name = "js-sys" -version = "0.3.69" +version = "0.3.83" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "29c15563dc2726973df627357ce0c9ddddbea194836909d655df6a75d2cf296d" +checksum = "464a3709c7f55f1f721e5389aa6ea4e3bc6aba669353300af094b29ffbdde1d8" dependencies = [ + "once_cell", "wasm-bindgen", ] [[package]] name = "lazy_static" -version = "1.4.0" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" +checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe" [[package]] name = "libc" -version = "0.2.176" +version = "0.2.178" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "58f929b4d672ea937a23a1ab494143d968337a5f47e56d0815df1e0890ddf174" +checksum = "37c93d8daa9d8a012fd8ab92f088405fb202ea0b6ab73ee2482ae66af4f42091" [[package]] name = "libredox" -version = "0.1.3" +version = "0.1.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c0ff37bd590ca25063e35af745c343cb7a0271906fb7b37e4813e8f79f00268d" +checksum = "3d0b95e02c851351f877147b7deea7b1afb1df71b63aa5f8270716e0c5720616" dependencies = [ - "bitflags 2.5.0", + "bitflags", "libc", ] [[package]] name = "linux-raw-sys" -version = "0.4.13" +version = "0.4.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "01cda141df6706de531b6c46c3a33ecca755538219bd484262fa09410c13539c" +checksum = "d26c52dbd32dccf2d10cac7725f8eae5296885fb5703b261f7d0a0739ec807ab" + +[[package]] +name = "linux-raw-sys" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "df1d3c3b53da64cf5760482273a98e575c651a67eec7f77df96b5b642de8f039" [[package]] name = "log" -version = "0.4.21" +version = "0.4.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "90ed8c1e510134f979dbc4f070f87d4313098b704861a105fe34231c70a3901c" +checksum = "5e5032e24019045c762d3c0f28f5b6b8bbf38563a65908389bf7978758920897" [[package]] name = "memchr" -version = "2.7.2" +version = "2.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c8640c5d730cb13ebd907d8d04b52f55ac9a2eec55b440c8892f40d56c76c1d" +checksum = "f52b00d39961fc5b2736ea853c9cc86238e165017a493d1d5c8eac6bdc4cc273" [[package]] name = "miniz_oxide" @@ -568,44 +606,57 @@ dependencies = [ [[package]] name = "nix" -version = "0.26.4" +version = "0.30.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "598beaf3cc6fdd9a5dfb1630c2800c7acd31df7aaf0f565796fba2b53ca1af1b" +checksum = "74523f3a35e05aba87a1d978330aef40f67b0304ac79c1c00b294c9830543db6" dependencies = [ - "bitflags 1.3.2", + "bitflags", "cfg-if", + "cfg_aliases", "libc", ] [[package]] name = "num-traits" -version = "0.2.18" +version = "0.2.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da0df0e5185db44f69b44f26786fe401b6c293d1907744beaa7fa62b2e5a517a" +checksum = "071dfc062690e90b734c0b2273ce72ad0ffa95f0c74596bc250dcfd960262841" dependencies = [ "autocfg", ] [[package]] name = "object" -version = "0.36.7" +version = "0.37.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62948e14d923ea95ea2c7c86c71013138b66525b86bdc08d2dcc262bdb497b87" +checksum = "ff76201f031d8863c38aa7f905eca4f53abbfa15f609db4277d44cd8938f33fe" dependencies = [ "memchr", ] [[package]] name = "once_cell" -version = "1.19.0" +version = "1.21.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "42f5e15c9953c5e4ccceeb2e7382a716482c34515315f7b03532b8b4e8393d2d" + +[[package]] +name = "once_cell_polyfill" +version = "1.70.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "384b8ab6d37215f3c5301a95a4accb5d64aa607f1fcb26a11b5303878451b4fe" + +[[package]] +name = "option-ext" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92" +checksum = "04744f49eae99ab78e0d5c0b603ab218f515ea8cfe5a456d7629ad883a3b6e7d" [[package]] name = "owo-colors" -version = "4.1.0" +version = "4.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fb37767f6569cd834a413442455e0f066d0d522de8630436e2a1761d9726ba56" +checksum = "9c6901729fa79e91a0913333229e9ca5dc725089d1c363b2f4b4760709dc4a52" dependencies = [ "supports-color 2.1.0", "supports-color 3.0.2", @@ -613,44 +664,50 @@ dependencies = [ [[package]] name = "pin-project-lite" -version = "0.2.14" +version = "0.2.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bda66fc9667c18cb2758a2ac84d1167245054bcf85d5d1aaa6923f45801bdd02" +checksum = "3b3cff922bd51709b605d9ead9aa71031d81447142d828eb4a6eba76fe619f9b" [[package]] name = "proc-macro2" -version = "1.0.81" +version = "1.0.104" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3d1597b0c024618f09a9c3b8655b7e430397a36d23fdafec26d6965e9eec3eba" +checksum = "9695f8df41bb4f3d222c95a67532365f569318332d03d5f3f67f37b20e6ebdf0" dependencies = [ "unicode-ident", ] [[package]] name = "quote" -version = "1.0.36" +version = "1.0.42" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fa76aaf39101c457836aec0ce2316dbdc3ab723cdda1c6bd4e6ad4208acaca7" +checksum = "a338cc41d27e6cc6dce6cefc13a0729dfbb81c262b1f519331575dd80ef3067f" dependencies = [ "proc-macro2", ] +[[package]] +name = "r-efi" +version = "5.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "69cdb34c158ceb288df11e18b4bd39de994f6657d83847bdffdbd7f346754b0f" + [[package]] name = "redox_users" -version = "0.4.5" +version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bd283d9651eeda4b2a83a43c1c91b266c40fd76ecd39a50a8c630ae69dc72891" +checksum = "a4e608c6638b9c18977b00b475ac1f28d14e84b27d8d42f70e0bf1e3dec127ac" dependencies = [ - "getrandom", + "getrandom 0.2.16", "libredox", "thiserror", ] [[package]] name = "regex" -version = "1.10.4" +version = "1.12.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c117dbdfde9c8308975b6a18d71f3f385c89461f7b3fb054288ecf2a2058ba4c" +checksum = "843bc0191f75f3e22651ae5f1e72939ab2f72a4bc30fa80a066bd66edefc24d4" dependencies = [ "aho-corasick", "memchr", @@ -660,9 +717,9 @@ dependencies = [ [[package]] name = "regex-automata" -version = "0.4.6" +version = "0.4.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "86b83b8b9847f9bf95ef68afb0b8e6cdb80f498442f5179a29fad448fcc1eaea" +checksum = "5276caf25ac86c8d810222b3dbb938e512c55c6831a10f3e6ed1c93b84041f1c" dependencies = [ "aho-corasick", "memchr", @@ -671,9 +728,9 @@ dependencies = [ [[package]] name = "regex-syntax" -version = "0.8.3" +version = "0.8.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "adad44e29e4c806119491a7f06f03de4d1af22c3a680dd47f1e6e179439d1f56" +checksum = "7a2d987857b319362043e95f5353c0535c1f58eec5336fdfcf626430af7def58" [[package]] name = "rustc-demangle" @@ -683,31 +740,44 @@ checksum = "56f7d92ca342cea22a06f2121d944b4fd82af56988c270852495420f961d4ace" [[package]] name = "rustc_version" -version = "0.4.0" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bfa0f585226d2e68097d4f95d113b15b83a82e819ab25717ec0590d9584ef366" +checksum = "cfcb3a22ef46e85b45de6ee7e79d063319ebb6594faafcf1c225ea92ab6e9b92" dependencies = [ "semver", ] [[package]] name = "rustix" -version = "0.38.34" +version = "0.38.44" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "70dc5ec042f7a43c4a73241207cecc9873a06d45debb38b329f8541d85c2730f" +checksum = "fdb5bc1ae2baa591800df16c9ca78619bf65c0488b41b96ccec5d11220d8c154" dependencies = [ - "bitflags 2.5.0", + "bitflags", "errno", "libc", - "linux-raw-sys", - "windows-sys", + "linux-raw-sys 0.4.15", + "windows-sys 0.59.0", ] [[package]] -name = "ryu" -version = "1.0.17" +name = "rustix" +version = "1.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e86697c916019a8588c99b5fac3cead74ec0b4b819707a682fd4d23fa0ce1ba1" +checksum = "146c9e247ccc180c1f61615433868c99f3de3ae256a30a43b49f67c2d9171f34" +dependencies = [ + "bitflags", + "errno", + "libc", + "linux-raw-sys 0.11.0", + "windows-sys 0.61.2", +] + +[[package]] +name = "rustversion" +version = "1.0.22" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b39cdef0fa800fc44525c84ccb54a029961a8215f9619753635a9c0d2538d46d" [[package]] name = "same-file" @@ -720,24 +790,34 @@ dependencies = [ [[package]] name = "semver" -version = "1.0.22" +version = "1.0.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "92d43fe69e652f3df9bdc2b85b2854a0825b86e4fb76bc44d945137d053639ca" +checksum = "d767eb0aabc880b29956c35734170f26ed551a859dbd361d140cdbeca61ab1e2" [[package]] name = "serde" -version = "1.0.199" +version = "1.0.228" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c9f6e76df036c77cd94996771fb40db98187f096dd0b9af39c6c6e452ba966a" +checksum = "9a8e94ea7f378bd32cbbd37198a4a91436180c5bb472411e48b5ec2e2124ae9e" +dependencies = [ + "serde_core", + "serde_derive", +] + +[[package]] +name = "serde_core" +version = "1.0.228" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "41d385c7d4ca58e59fc732af25c3983b67ac852c1a25000afe1175de458b67ad" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.199" +version = "1.0.228" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "11bd257a6541e141e42ca6d24ae26f7714887b47e89aa739099104c7e4d3b7fc" +checksum = "d540f220d3187173da220f885ab66608367b6574e925011a9353e4badda91d79" dependencies = [ "proc-macro2", "quote", @@ -746,33 +826,45 @@ dependencies = [ [[package]] name = "serde_ignored" -version = "0.1.10" +version = "0.1.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a8e319a36d1b52126a0d608f24e93b2d81297091818cd70625fcf50a15d84ddf" +checksum = "115dffd5f3853e06e746965a20dcbae6ee747ae30b543d91b0e089668bb07798" dependencies = [ "serde", + "serde_core", ] [[package]] name = "serde_json" -version = "1.0.116" +version = "1.0.148" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3e17db7126d17feb94eb3fad46bf1a96b034e8aacbc2e775fe81505f8b0b2813" +checksum = "3084b546a1dd6289475996f182a22aba973866ea8e8b02c51d9f46b1336a22da" dependencies = [ "itoa", - "ryu", + "memchr", "serde", + "serde_core", + "zmij", ] [[package]] name = "serde_spanned" -version = "0.6.5" +version = "0.6.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eb3622f419d1296904700073ea6cc23ad690adbd66f13ea683df73298736f0c1" +checksum = "bf41e0cfaf7226dca15e8197172c295a782857fcb97fad1808a166870dee75a3" dependencies = [ "serde", ] +[[package]] +name = "serde_spanned" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8bbf91e5a4d6315eee45e704372590b30e260ee83af6639d64557f51b067776" +dependencies = [ + "serde_core", +] + [[package]] name = "sharded-slab" version = "0.1.7" @@ -790,15 +882,21 @@ checksum = "45bb67a18fa91266cc7807181f62f9178a6873bfad7dc788c42e6430db40184f" [[package]] name = "shell-words" -version = "1.1.0" +version = "1.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dc6fe69c597f9c37bfeeeeeb33da3530379845f10be461a66d16d03eca2ded77" + +[[package]] +name = "shlex" +version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "24188a676b6ae68c3b2cb3a01be17fbf7240ce009799bb56d5b1409051e78fde" +checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64" [[package]] name = "signal-hook" -version = "0.3.17" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8621587d4798caf8eb44879d42e56b9a93ea5dcd315a6487c357130095b62801" +checksum = "2a37d01603c37b5466f808de79f845c7116049b0579adb70a6b7d47c1fa3a952" dependencies = [ "libc", "signal-hook-registry", @@ -806,10 +904,11 @@ dependencies = [ [[package]] name = "signal-hook-registry" -version = "1.4.2" +version = "1.4.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a9e9e0b4211b72e7b8b6e85c807d36c212bdb33ea8587f7569562a84df5465b1" +checksum = "c4db69cba1110affc0e9f7bcd48bbf87b3f4fc7c61fc9155afd4c469eb3d6c1b" dependencies = [ + "errno", "libc", ] @@ -840,9 +939,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.60" +version = "2.0.112" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "909518bc7b1c9b779f1bbf07f2929d35af9f0f37e47c6e9ef7f9dddc1e1821f3" +checksum = "21f182278bf2d2bcb3c88b1b08a37df029d71ce3d3ae26168e3c653b213b99d4" dependencies = [ "proc-macro2", "quote", @@ -851,30 +950,31 @@ dependencies = [ [[package]] name = "tempfile" -version = "3.10.1" +version = "3.24.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85b77fafb263dd9d05cbeac119526425676db3784113aa9295c88498cbf8bff1" +checksum = "655da9c7eb6305c55742045d5a8d2037996d61d8de95806335c7c86ce0f82e9c" dependencies = [ - "cfg-if", "fastrand", - "rustix", - "windows-sys", + "getrandom 0.3.4", + "once_cell", + "rustix 1.1.3", + "windows-sys 0.61.2", ] [[package]] name = "thiserror" -version = "1.0.59" +version = "2.0.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f0126ad08bff79f29fc3ae6a55cc72352056dfff61e3ff8bb7129476d44b23aa" +checksum = "f63587ca0f12b72a0600bcba1d40081f830876000bb46dd2337a3051618f4fc8" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.59" +version = "2.0.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d1cd413b5d558b4c5bf3680e324a6fa5014e7b7c067a51e69dbdf47eb7148b66" +checksum = "3ff15c8ecd7de3849db632e14d18d2571fa09dfc5ed93479bc4485c7a517c913" dependencies = [ "proc-macro2", "quote", @@ -883,12 +983,11 @@ dependencies = [ [[package]] name = "thread_local" -version = "1.1.8" +version = "1.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b9ef9bad013ada3808854ceac7b46812a6465ba368859a37e2100283d2d719c" +checksum = "f60246a4944f24f6e018aa17cdeffb7818b76356965d03b07d6a9886e8962185" dependencies = [ "cfg-if", - "once_cell", ] [[package]] @@ -898,20 +997,44 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dd79e69d3b627db300ff956027cc6c3798cef26d22526befdfcd12feeb6d2257" dependencies = [ "serde", - "serde_spanned", - "toml_datetime", + "serde_spanned 0.6.9", + "toml_datetime 0.6.11", "toml_edit", ] +[[package]] +name = "toml" +version = "0.9.10+spec-1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0825052159284a1a8b4d6c0c86cbc801f2da5afd2b225fa548c72f2e74002f48" +dependencies = [ + "indexmap", + "serde_core", + "serde_spanned 1.0.4", + "toml_datetime 0.7.5+spec-1.1.0", + "toml_parser", + "toml_writer", + "winnow 0.7.14", +] + [[package]] name = "toml_datetime" -version = "0.6.5" +version = "0.6.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3550f4e9685620ac18a50ed434eb3aec30db8ba93b0287467bca5826ea25baf1" +checksum = "22cddaf88f4fbc13c51aebbf5f8eceb5c7c5a9da2ac40a13519eb5b0a0e8f11c" dependencies = [ "serde", ] +[[package]] +name = "toml_datetime" +version = "0.7.5+spec-1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "92e1cfed4a3038bc5a127e35a2d360f145e1f4b971b551a2ba5fd7aedf7e1347" +dependencies = [ + "serde_core", +] + [[package]] name = "toml_edit" version = "0.19.15" @@ -920,16 +1043,31 @@ checksum = "1b5bb770da30e5cbfde35a2d7b9b8a2c4b8ef89548a7a6aeab5c9a576e3e7421" dependencies = [ "indexmap", "serde", - "serde_spanned", - "toml_datetime", - "winnow", + "serde_spanned 0.6.9", + "toml_datetime 0.6.11", + "winnow 0.5.40", ] +[[package]] +name = "toml_parser" +version = "1.0.6+spec-1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a3198b4b0a8e11f09dd03e133c0280504d0801269e9afa46362ffde1cbeebf44" +dependencies = [ + "winnow 0.7.14", +] + +[[package]] +name = "toml_writer" +version = "1.0.6+spec-1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ab16f14aed21ee8bfd8ec22513f7287cd4a91aa92e44edfe2c17ddd004e92607" + [[package]] name = "tracing" -version = "0.1.40" +version = "0.1.44" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3523ab5a71916ccf420eebdf5521fcef02141234bbc0b8a49f2fdc4544364ef" +checksum = "63e71662fa4b2a2c3a26f570f037eb95bb1f85397f3cd8076caed2f026a6d100" dependencies = [ "pin-project-lite", "tracing-core", @@ -937,9 +1075,9 @@ dependencies = [ [[package]] name = "tracing-core" -version = "0.1.32" +version = "0.1.36" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c06d3da6113f116aaee68e4d601191614c9053067f9ab7f6edbcb161237daa54" +checksum = "db97caf9d906fbde555dd62fa95ddba9eecfd14cb388e4f491a66d74cd5fb79a" dependencies = [ "once_cell", "valuable", @@ -947,9 +1085,9 @@ dependencies = [ [[package]] name = "tracing-error" -version = "0.2.0" +version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d686ec1c0f384b1277f097b2f279a2ecc11afe8c133c1aabf036a27cb4cd206e" +checksum = "8b1581020d7a273442f5b45074a6a57d5757ad0a47dac0e9f0bd57b81936f3db" dependencies = [ "tracing", "tracing-subscriber", @@ -957,9 +1095,9 @@ dependencies = [ [[package]] name = "tracing-subscriber" -version = "0.3.18" +version = "0.3.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ad0f048c97dbd9faa9b7df56362b8ebcaa52adb06b498c050d2f4e32f90a7a8b" +checksum = "2f30143827ddab0d256fd843b7a66d164e9f271cfa0dde49142c5ca0ca291f1e" dependencies = [ "sharded-slab", "thread_local", @@ -968,21 +1106,21 @@ dependencies = [ [[package]] name = "unicode-ident" -version = "1.0.12" +version = "1.0.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" +checksum = "9312f7c4f6ff9069b165498234ce8be658059c6728633667c526e27dc2cf1df5" [[package]] name = "utf8parse" -version = "0.2.1" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "711b9620af191e0cdc7468a8d14e709c3dcdb115b36f838e601583af800a370a" +checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821" [[package]] name = "valuable" -version = "0.1.0" +version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "830b7e5d4d90034032940e4ace0d9a9a057e7a45cd94e6c007832e39edb82f6d" +checksum = "ba73ea9cf16a25df0c8caa16c51acb937d5712a8429db78a3ee29d5dcacd3a65" [[package]] name = "walkdir" @@ -996,40 +1134,37 @@ dependencies = [ [[package]] name = "wasi" -version = "0.11.0+wasi-snapshot-preview1" +version = "0.11.1+wasi-snapshot-preview1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" +checksum = "ccf3ec651a847eb01de73ccad15eb7d99f80485de043efb2f370cd654f4ea44b" [[package]] -name = "wasm-bindgen" -version = "0.2.92" +name = "wasip2" +version = "1.0.1+wasi-0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4be2531df63900aeb2bca0daaaddec08491ee64ceecbee5076636a3b026795a8" +checksum = "0562428422c63773dad2c345a1882263bbf4d65cf3f42e90921f787ef5ad58e7" dependencies = [ - "cfg-if", - "wasm-bindgen-macro", + "wit-bindgen", ] [[package]] -name = "wasm-bindgen-backend" -version = "0.2.92" +name = "wasm-bindgen" +version = "0.2.106" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "614d787b966d3989fa7bb98a654e369c762374fd3213d212cfc0251257e747da" +checksum = "0d759f433fa64a2d763d1340820e46e111a7a5ab75f993d1852d70b03dbb80fd" dependencies = [ - "bumpalo", - "log", + "cfg-if", "once_cell", - "proc-macro2", - "quote", - "syn", + "rustversion", + "wasm-bindgen-macro", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-macro" -version = "0.2.92" +version = "0.2.106" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1f8823de937b71b9460c0c34e25f3da88250760bec0ebac694b49997550d726" +checksum = "48cb0d2638f8baedbc542ed444afc0644a29166f1595371af4fecf8ce1e7eeb3" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -1037,22 +1172,25 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.92" +version = "0.2.106" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e94f17b526d0a461a191c78ea52bbce64071ed5c04c9ffe424dcb38f74171bb7" +checksum = "cefb59d5cd5f92d9dcf80e4683949f15ca4b511f4ac0a6e14d4e1ac60c6ecd40" dependencies = [ + "bumpalo", "proc-macro2", "quote", "syn", - "wasm-bindgen-backend", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-shared" -version = "0.2.92" +version = "0.2.106" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af190c94f2773fdb3729c55b007a722abb5384da03bc0986df4c289bf5567e96" +checksum = "cbc538057e648b67f72a982e708d485b2efa771e1ac05fec311f9f63e5800db4" +dependencies = [ + "unicode-ident", +] [[package]] name = "which" @@ -1063,14 +1201,25 @@ dependencies = [ "either", "home", "once_cell", - "rustix", + "rustix 0.38.44", +] + +[[package]] +name = "which" +version = "8.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3fabb953106c3c8eea8306e4393700d7657561cb43122571b172bbfb7c7ba1d" +dependencies = [ + "env_home", + "rustix 1.1.3", + "winsafe", ] [[package]] name = "wildmatch" -version = "2.3.3" +version = "2.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "939e59c1bc731542357fdaad98b209ef78c8743d652bb61439d16b16a79eb025" +checksum = "29333c3ea1ba8b17211763463ff24ee84e41c78224c16b001cd907e663a38c68" [[package]] name = "winapi" @@ -1090,11 +1239,11 @@ checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" [[package]] name = "winapi-util" -version = "0.1.8" +version = "0.1.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4d4cc384e1e73b93bafa6fb4f1df8c41695c8a91cf9c4c64358067d15a7b6c6b" +checksum = "c2a7b1c03c876122aa43f3020e6c3c3ee5c05081c9a00739faf7503aeba10d22" dependencies = [ - "windows-sys", + "windows-sys 0.61.2", ] [[package]] @@ -1105,22 +1254,81 @@ checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" [[package]] name = "windows-core" -version = "0.52.0" +version = "0.62.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "33ab640c8d7e35bf8ba19b884ba838ceb4fba93a4e8c65a9059d08afcfc683d9" +checksum = "b8e83a14d34d0623b51dce9581199302a221863196a1dde71a7663a4c2be9deb" dependencies = [ - "windows-targets", + "windows-implement", + "windows-interface", + "windows-link", + "windows-result", + "windows-strings", +] + +[[package]] +name = "windows-implement" +version = "0.60.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "053e2e040ab57b9dc951b72c264860db7eb3b0200ba345b4e4c3b14f67855ddf" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "windows-interface" +version = "0.59.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f316c4a2570ba26bbec722032c4099d8c8bc095efccdc15688708623367e358" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "windows-link" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f0805222e57f7521d6a62e36fa9163bc891acd422f971defe97d64e70d0a4fe5" + +[[package]] +name = "windows-result" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7781fa89eaf60850ac3d2da7af8e5242a5ea78d1a11c49bf2910bb5a73853eb5" +dependencies = [ + "windows-link", +] + +[[package]] +name = "windows-strings" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7837d08f69c77cf6b07689544538e017c1bfcf57e34b4c0ff58e6c2cd3b37091" +dependencies = [ + "windows-link", ] [[package]] name = "windows-sys" -version = "0.52.0" +version = "0.59.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" +checksum = "1e38bc4d79ed67fd075bcc251a1c39b32a1776bbe92e5bef1f0bf1f8c531853b" dependencies = [ "windows-targets", ] +[[package]] +name = "windows-sys" +version = "0.61.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ae137229bcbd6cdf0f7b80a31df61766145077ddf49416a728b02cb3921ff3fc" +dependencies = [ + "windows-link", +] + [[package]] name = "windows-targets" version = "0.52.6" @@ -1194,6 +1402,24 @@ dependencies = [ "memchr", ] +[[package]] +name = "winnow" +version = "0.7.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5a5364e9d77fcdeeaa6062ced926ee3381faa2ee02d3eb83a5c27a8825540829" + +[[package]] +name = "winsafe" +version = "0.0.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d135d17ab770252ad95e9a872d365cf3090e3be864a34ab46f48555993efc904" + +[[package]] +name = "wit-bindgen" +version = "0.46.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f17a85883d4e6d00e8a97c586de764dabcc06133f7f1d55dce5cdc070ad7fe59" + [[package]] name = "xtask" version = "0.0.0-dev.0" @@ -1208,8 +1434,14 @@ dependencies = [ "serde", "serde_json", "shell-words", - "toml", + "toml 0.7.8", "walkdir", - "which", + "which 4.4.2", "wildmatch", ] + +[[package]] +name = "zmij" +version = "1.0.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aac060176f7020d62c3bcc1cdbcec619d54f48b07ad1963a3f80ce7a0c17755f" diff --git a/Cargo.toml b/Cargo.toml index 1cd7b5fd2..0e6792d63 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -31,19 +31,19 @@ is-terminal = "0.4.2" clap = { version = "4.1.4", features = ["derive"] } color-eyre = { version = "0.6.5", default-features = false, features = ["track-caller"] } eyre = "0.6.8" -thiserror = "1.0.38" +thiserror = "2.0" home = "0.5.4" rustc_version = "0.4.0" -toml = "0.7.0" -which = { version = "4.4.0", default-features = false } +toml = "0.9" +which = "8.0" shell-escape = "0.1.5" serde = { version = "1.0.152", features = ["derive"] } serde_json = { version = "1.0.91", features = ["raw_value"] } serde_ignored = "0.1.7" shell-words = "1.1.0" -const-sha1 = "0.2.0" -signal-hook = { version = "0.3.15" } -directories = "4.0.1" +const-sha1 = "0.3" +signal-hook = { version = "0.4" } +directories = "6.0" walkdir = { version = "2.3.2", optional = true } tempfile = "3.3.0" owo-colors = { version = "4.0", features = ["supports-colors"] } @@ -51,7 +51,7 @@ semver = "1.0.16" is_ci = "1.1.1" [target.'cfg(not(windows))'.dependencies] -nix = { version = "0.26.2", default-features = false, features = ["user"] } +nix = { version = "0.30", default-features = false, features = ["user"] } libc = "0.2.139" [target.'cfg(windows)'.dependencies] diff --git a/src/cross_toml.rs b/src/cross_toml.rs index 40ae74317..8435cdede 100644 --- a/src/cross_toml.rs +++ b/src/cross_toml.rs @@ -156,7 +156,7 @@ impl CrossToml { source: Option<&str>, msg_info: &mut MessageInfo, ) -> Result<(Self, BTreeSet)> { - let tomld = toml::Deserializer::new(toml_str); + let tomld = toml::Deserializer::parse(toml_str)?; Self::parse_from_deserializer(tomld, source, msg_info) } diff --git a/src/docker/shared.rs b/src/docker/shared.rs index 1045bd3ba..f7d455cb7 100644 --- a/src/docker/shared.rs +++ b/src/docker/shared.rs @@ -1542,8 +1542,7 @@ pub const PATH_HASH_SHORT: usize = 5; pub const PATH_HASH_UNIQUE: usize = 10; fn path_digest(path: &Path) -> Result { - let buffer = const_sha1::ConstBuffer::from_slice(path.to_utf8()?.as_bytes()); - Ok(const_sha1::sha1(&buffer)) + Ok(const_sha1::sha1(path.to_utf8()?.as_bytes())) } pub fn path_hash(path: &Path, count: usize) -> Result { diff --git a/src/id.rs b/src/id.rs index d1cd6dd24..3442536ae 100644 --- a/src/id.rs +++ b/src/id.rs @@ -1,6 +1,6 @@ #[cfg(not(target_os = "windows"))] use nix::{ - errno::{errno, Errno}, + errno::Errno, unistd::{Gid, Uid}, }; #[cfg(not(target_os = "windows"))] @@ -63,13 +63,13 @@ pub fn username() -> Result> { let passwd = libc::getpwuid(Uid::current().as_raw()); if passwd.is_null() { - let errno = errno(); + let errno = Errno::last_raw(); if errno == 0 { return Ok(None); } - return Err(Errno::from_i32(errno)).wrap_err("could not get username"); + return Err(Errno::from_raw(errno)).wrap_err("could not get username"); } CStr::from_ptr((*passwd).pw_name) diff --git a/src/rustc.rs b/src/rustc.rs index ef50475d2..d7b847e45 100644 --- a/src/rustc.rs +++ b/src/rustc.rs @@ -77,8 +77,7 @@ pub fn hash_from_version_string(version: &str, index: usize) -> String { } // fallback: can't extract the hash. just create a hash of the version string. - let buffer = const_sha1::ConstBuffer::from_slice(version.as_bytes()); - short_commit_hash(&const_sha1::sha1(&buffer).to_string()) + short_commit_hash(&const_sha1::sha1(version.as_bytes()).to_string()) } #[derive(Debug, Clone, Deserialize, PartialEq, Eq)] From 580f5d194e03e832308cbdb5d89ef4e7afddf1f1 Mon Sep 17 00:00:00 2001 From: Abdelkader Boudih Date: Sat, 3 Jan 2026 00:59:29 +0100 Subject: [PATCH 2/2] address feedback update to latest stable --- .github/workflows/ci.yml | 2 +- Cargo.toml | 2 +- README.md | 2 +- clippy.toml | 2 +- deny.toml | 3 ++- src/build.rs | 1 + src/cargo.rs | 2 +- src/config.rs | 9 +++------ src/docker/build.rs | 2 +- src/docker/custom.rs | 7 ++++--- src/docker/remote.rs | 9 ++++----- src/docker/shared.rs | 8 +++++++- src/extensions.rs | 8 ++++---- src/lib.rs | 23 ++++++++++------------- src/rustup.rs | 2 +- src/tests.rs | 4 ++-- src/tests/toml.rs | 4 ++-- xtask/src/changelog.rs | 6 +++--- xtask/src/ci/target_matrix.rs | 7 +++---- 19 files changed, 52 insertions(+), 51 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index be9c0f7e2..e84ba6d75 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -74,7 +74,7 @@ jobs: - uses: ./.github/actions/setup-rust with: components: clippy - toolchain: 1.77.2 # MSRV, Minimally Supported Rust Version. Make sure to update README.md and clippy.toml + toolchain: 1.92.0 # MSRV, Minimally Supported Rust Version. Make sure to update README.md and clippy.toml - name: Run clippy run: cargo clippy --locked --all-targets --all-features --workspace -- -D warnings test: diff --git a/Cargo.toml b/Cargo.toml index 0e6792d63..25f4ca335 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -17,7 +17,7 @@ include = [ "README.md", "assets/*", ] -rust-version = "1.77.2" +rust-version = "1.92.0" [features] default = [] diff --git a/README.md b/README.md index 4eb2985ee..707cc2a12 100644 --- a/README.md +++ b/README.md @@ -321,7 +321,7 @@ $ QEMU_STRACE=1 cross run --target aarch64-unknown-linux-gnu ## Minimum Supported Rust Version (MSRV) -This crate is guaranteed to compile on stable Rust 1.77.2 and up. It *might* +This crate is guaranteed to compile on stable Rust 1.92.0 and up. It *might* compile with older versions but that may change in any new patch release. Some cross-compilation targets require a later Rust version, and using Xargo diff --git a/clippy.toml b/clippy.toml index fe7b17498..91da96a84 100644 --- a/clippy.toml +++ b/clippy.toml @@ -2,4 +2,4 @@ disallowed-methods = [ { path = "std::path::Path::display", reason = "incorrect handling of non-Unicode paths, use path.to_utf8() or debug (`{path:?}`) instead" }, ] allow-unwrap-in-tests = true -msrv = "1.77.2" +msrv = "1.92.0" diff --git a/deny.toml b/deny.toml index 0dd47773e..966073a48 100644 --- a/deny.toml +++ b/deny.toml @@ -14,7 +14,6 @@ version = 2 multiple-versions = "deny" deny = [] skip-tree = [ - { name = "nix", version = "=0.26.4", depth = 2 }, { name = "supports-color", depth = 1, version = "2.1.0", reason = "owo-colors pulls in two versions of supports-color" }, ] @@ -38,6 +37,8 @@ allow = [ "BSD-3-Clause", "Unlicense", "Unicode-DFS-2016", + "Unicode-3.0", + "MPL-2.0", ] [licenses.private] diff --git a/src/build.rs b/src/build.rs index 11bbcc80c..60f73a505 100644 --- a/src/build.rs +++ b/src/build.rs @@ -24,6 +24,7 @@ fn main() { .write_all(commit_info().as_bytes()) .unwrap(); + println!("cargo::rustc-check-cfg=cfg(cross_sandboxed)"); if env::var("CROSS_SANDBOXED").is_ok() { println!("cargo:rustc-cfg=cross_sandboxed"); } diff --git a/src/cargo.rs b/src/cargo.rs index 010c655ef..92fb6a775 100644 --- a/src/cargo.rs +++ b/src/cargo.rs @@ -50,7 +50,7 @@ impl Subcommand { } } -impl<'a> From<&'a str> for Subcommand { +impl From<&str> for Subcommand { fn from(s: &str) -> Subcommand { match s { "b" | "build" => Subcommand::Build, diff --git a/src/config.rs b/src/config.rs index cd62b73c7..ff73b4722 100644 --- a/src/config.rs +++ b/src/config.rs @@ -185,7 +185,7 @@ impl Environment { fn custom_toolchain(&self) -> bool { self.get_var("CROSS_CUSTOM_TOOLCHAIN") - .map_or(false, |s| bool_from_envvar(&s)) + .is_some_and(|s| bool_from_envvar(&s)) } fn custom_toolchain_compat(&self) -> Option { @@ -259,12 +259,9 @@ impl Config { for mentioned_target in keys { let mentioned_target_norm = mentioned_target .to_string() - .replace(|c| c == '-' || c == '_', "") - .to_lowercase(); - let target_norm = target - .to_string() - .replace(|c| c == '-' || c == '_', "") + .replace(['-', '_'], "") .to_lowercase(); + let target_norm = target.to_string().replace(['-', '_'], "").to_lowercase(); if mentioned_target != target && mentioned_target_norm == target_norm { msg_info.warn(format_args!("a target named \"{mentioned_target}\" is mentioned in the Cross configuration, but the current specified target is \"{target}\"."))?; msg_info.status(" > Is the target misspelled in the Cross configuration?")?; diff --git a/src/docker/build.rs b/src/docker/build.rs index 9a98c2839..c2f9bfc8d 100644 --- a/src/docker/build.rs +++ b/src/docker/build.rs @@ -100,7 +100,7 @@ impl BuildResultExt for Result<()> { .path .file_name() .and_then(|s| s.to_str()) - .map_or_else(|| "container engine", |s| s) + .unwrap_or("container engine") ) }) } diff --git a/src/docker/custom.rs b/src/docker/custom.rs index b310bdd42..380eb4b25 100644 --- a/src/docker/custom.rs +++ b/src/docker/custom.rs @@ -155,9 +155,10 @@ impl<'a> Dockerfile<'a> { docker_build.args(Engine::parse_opts(&build_opts)?); } - let has_output = options.config.build_opts().map_or(false, |opts| { - opts.contains("--load") || opts.contains("--output") - }); + let has_output = options + .config + .build_opts() + .is_some_and(|opts| opts.contains("--load") || opts.contains("--output")); if options.engine.kind.is_docker() && !has_output { docker_build.args(["--output", "type=docker"]); }; diff --git a/src/docker/remote.rs b/src/docker/remote.rs index b6e553770..3fc966e10 100644 --- a/src/docker/remote.rs +++ b/src/docker/remote.rs @@ -614,7 +614,7 @@ impl Fingerprint { let to_copy: Vec<&str> = current .map .iter() - .filter(|(k, v1)| self.map.get(*k).map_or(true, |v2| v1 != &v2)) + .filter(|(k, v1)| self.map.get(*k).is_none_or(|v2| v1 != &v2)) .map(|(k, _)| k.as_str()) .collect(); let to_remove: Vec<&str> = self @@ -926,7 +926,7 @@ pub(crate) fn run( final_args.push(arg); } } - if !has_target_dir && subcommand.map_or(true, |s| s.needs_target_in_command()) { + if !has_target_dir && subcommand.is_none_or(|s| s.needs_target_in_command()) { final_args.push("--target-dir".to_owned()); final_args.push(target_dir.clone()); } @@ -1003,15 +1003,14 @@ symlink_recurse \"${{prefix}}\" { subcommand_or_exit(engine, "cp")? .arg("-a") - .arg(&format!("{container_id}:{mount_target_dir}",)) + .arg(format!("{container_id}:{mount_target_dir}",)) .arg( package_dirs .target() .parent() .expect("target directory should have a parent"), ) - .run_and_get_status(msg_info, false) - .map_err::(Into::into)?; + .run_and_get_status(msg_info, false)?; } ChildContainer::finish_static(is_tty, msg_info); diff --git a/src/docker/shared.rs b/src/docker/shared.rs index f7d455cb7..7395f3172 100644 --- a/src/docker/shared.rs +++ b/src/docker/shared.rs @@ -561,6 +561,12 @@ pub struct ChildContainer { exists: AtomicBool, } +impl Default for ChildContainer { + fn default() -> Self { + Self::new() + } +} + impl ChildContainer { pub const fn new() -> ChildContainer { ChildContainer { @@ -1525,7 +1531,7 @@ impl MountFinder { if cfg!(target_os = "windows") && host { // On Windows, we can not mount the directory name directly. // Instead, we convert the path to a linux compatible path. - return path.to_utf8().map(ToOwned::to_owned); + path.to_utf8().map(ToOwned::to_owned) } else if cfg!(target_os = "windows") { path.as_posix_absolute() } else { diff --git a/src/extensions.rs b/src/extensions.rs index 992eb8d46..5578ccd40 100644 --- a/src/extensions.rs +++ b/src/extensions.rs @@ -97,9 +97,9 @@ impl CommandExt for Command { let msg_info = &mut msg_info; let mut string = String::new(); if let Some(caller) = msg_info.caller() { - write!(string, "[{}] ->\n+ ", caller).unwrap(); + write!(string, "[{}] ->\n+ ", caller).expect("writing to string should not fail"); } else { - write!(string, "+ ").unwrap(); + write!(string, "+ ").expect("writing to string should not fail"); }; if let Some(cwd) = self.get_current_dir() { write!( @@ -108,14 +108,14 @@ impl CommandExt for Command { cwd, msg_info.as_verbose(|info| self.command_pretty(info, |_| false)) ) - .unwrap(); + .expect("writing to string should not fail"); } else { write!( string, "{}", msg_info.as_verbose(|info| self.command_pretty(info, |_| false)) ) - .unwrap(); + .expect("writing to string should not fail"); } string } diff --git a/src/lib.rs b/src/lib.rs index a65668e17..50573e23f 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -24,7 +24,6 @@ clippy::ref_binding_to_reference, clippy::semicolon_if_nothing_returned, clippy::str_to_string, - clippy::string_to_string, clippy::unwrap_used )] @@ -181,15 +180,13 @@ impl TargetTriple { // variable `CROSS_COMPATIBILITY_VERSION`. Ok("0.2.1") => match self { TargetTriple::X86_64AppleDarwin | TargetTriple::Aarch64AppleDarwin => { - target.map_or(false, |t| t.needs_docker()) + target.is_some_and(|t| t.needs_docker()) } TargetTriple::X86_64UnknownLinuxGnu | TargetTriple::Aarch64UnknownLinuxGnu | TargetTriple::X86_64UnknownLinuxMusl - | TargetTriple::Aarch64UnknownLinuxMusl => { - target.map_or(true, |t| t.needs_docker()) - } - TargetTriple::X86_64PcWindowsMsvc => target.map_or(false, |t| { + | TargetTriple::Aarch64UnknownLinuxMusl => target.is_none_or(|t| t.needs_docker()), + TargetTriple::X86_64PcWindowsMsvc => target.is_some_and(|t| { t.triple() != TargetTriple::X86_64PcWindowsMsvc.triple() && t.needs_docker() }), TargetTriple::Other(_) => false, @@ -204,7 +201,7 @@ impl TargetTriple { // example to test custom docker images. Cross should not try to recognize if host and // target are equal, it's a user decision and if user wants to bypass cross he can call // cargo directly or omit the `--target` option. - _ => target.map_or(false, |t| t.needs_docker()), + _ => target.is_some_and(|t| t.needs_docker()), } } @@ -223,7 +220,7 @@ impl TargetTriple { } } -impl<'a> From<&'a str> for TargetTriple { +impl From<&str> for TargetTriple { fn from(s: &str) -> TargetTriple { match s { "x86_64-apple-darwin" => TargetTriple::X86_64AppleDarwin, @@ -601,7 +598,7 @@ pub fn run( let needs_docker = args .subcommand .clone() - .map_or(false, |sc| sc.needs_docker(is_remote)); + .is_some_and(|sc| sc.needs_docker(is_remote)); if target.needs_docker() && needs_docker { let paths = docker::DockerPaths::create( &engine, @@ -645,7 +642,7 @@ pub fn run( return Ok(None); }; - let needs_host = args.subcommand.map_or(false, |sc| sc.needs_host(is_remote)); + let needs_host = args.subcommand.is_some_and(|sc| sc.needs_host(is_remote)); if !status.success() { warn_on_failure(&target, &toolchain, msg_info)?; } @@ -669,7 +666,7 @@ pub fn install_interpreter_if_needed( let needs_interpreter = args .subcommand .clone() - .map_or(false, |sc| sc.needs_interpreter()); + .is_some_and(|sc| sc.needs_interpreter()); if host_version_meta.needs_interpreter() && needs_interpreter @@ -694,7 +691,7 @@ pub fn get_filtered_args( let mut filtered_args = if args .subcommand .clone() - .map_or(false, |s| !s.needs_target_in_command()) + .is_some_and(|s| !s.needs_target_in_command()) { let mut filtered_args = Vec::new(); let mut args_iter = args.cargo_args.clone().into_iter(); @@ -737,7 +734,7 @@ pub fn get_filtered_args( let is_test = args .subcommand .clone() - .map_or(false, |sc| sc == Subcommand::Test); + .is_some_and(|sc| sc == Subcommand::Test); if is_test && config.doctests().unwrap_or_default() && is_nightly { filtered_args.push("-Zdoctest-xcompile".to_owned()); } diff --git a/src/rustup.rs b/src/rustup.rs index d44414d21..d1364d9f2 100644 --- a/src/rustup.rs +++ b/src/rustup.rs @@ -300,7 +300,7 @@ pub fn setup_components( if args .subcommand .clone() - .map_or(false, |sc| sc == crate::Subcommand::Clippy) + .is_some_and(|sc| sc == crate::Subcommand::Clippy) && !component_is_installed("clippy", toolchain, msg_info)? { install_component("clippy", toolchain, msg_info)?; diff --git a/src/tests.rs b/src/tests.rs index 91725b78e..d7184bd53 100644 --- a/src/tests.rs +++ b/src/tests.rs @@ -39,7 +39,7 @@ pub fn walk_dir<'a>( .any(|dir| e.file_name() == dir) { return false; - } else if e.file_type().map_or(false, |f| f.is_dir()) { + } else if e.file_type().is_some_and(|f| f.is_dir()) { return true; } ext(e.path().extension()) @@ -141,7 +141,7 @@ release: {version} fn check_newlines() -> crate::Result<()> { for file in walk_dir(get_cargo_workspace(), &[".git", "target"], |_| true) { let file = file?; - if !file.file_type().map_or(true, |f| f.is_file()) { + if !file.file_type().is_none_or(|f| f.is_file()) { continue; } eprintln!("File: {:?}", file.path()); diff --git a/src/tests/toml.rs b/src/tests/toml.rs index 161b1e7dc..469f092e5 100644 --- a/src/tests/toml.rs +++ b/src/tests/toml.rs @@ -30,7 +30,7 @@ fn toml_check() -> Result<(), Box> { for dir_entry in walk { let dir_entry = dir_entry?; - if dir_entry.file_type().map_or(true, |f| f.is_dir()) { + if dir_entry.file_type().is_none_or(|f| f.is_dir()) { continue; } eprintln!("File: {:?}", dir_entry.path()); @@ -89,7 +89,7 @@ pub fn text_line_no(text: &str, index: usize) -> usize { let mut count = 0; for line in text.split('\n') { line_no += 1; - count += line.as_bytes().len() + 1; + count += line.len() + 1; if count >= index { break; } diff --git a/xtask/src/changelog.rs b/xtask/src/changelog.rs index 8a83a6acf..3ea79b396 100644 --- a/xtask/src/changelog.rs +++ b/xtask/src/changelog.rs @@ -358,7 +358,7 @@ fn read_changes(changes_dir: &Path) -> cross::Result { let file_name = entry.file_name(); let path = entry.path(); let ext = path.extension(); - if file_type.is_file() && ext.map_or(false, |v| v == "json") { + if file_type.is_file() && ext.is_some_and(|v| v == "json") { let stem = file_stem(&path)?; let id = IdType::parse_stem(stem)?; let contents = fs::read_to_string(path)?; @@ -433,7 +433,7 @@ fn delete_changes(root: &Path) -> cross::Result<()> { let file_type = entry.file_type()?; let srcpath = entry.path(); let ext = srcpath.extension(); - if file_type.is_file() && ext.map_or(false, |v| v == "json") { + if file_type.is_file() && ext.is_some_and(|v| v == "json") { fs::remove_file(srcpath)?; } } @@ -519,7 +519,7 @@ pub fn validate_changelog( if files.is_empty() { files = fs::read_dir(&changes_dir)? .filter_map(|x| x.ok()) - .filter(|x| x.file_type().map_or(false, |v| v.is_file())) + .filter(|x| x.file_type().is_ok_and(|v| v.is_file())) .filter_map(|x| { if x.path() .extension() diff --git a/xtask/src/ci/target_matrix.rs b/xtask/src/ci/target_matrix.rs index 4b8a518c3..e238e3e6e 100644 --- a/xtask/src/ci/target_matrix.rs +++ b/xtask/src/ci/target_matrix.rs @@ -204,7 +204,7 @@ fn has_no_ci_tests_label(pr: &str) -> cross::Result { /// Convert a `GITHUB_REF` into it's merge group pr fn process_merge_group(ref_: &str) -> cross::Result<&str> { ref_.split('/') - .last() + .next_back() .unwrap_or_default() .strip_prefix("pr-") .ok_or_else(|| eyre::eyre!("merge group ref must start last / segment with \"pr-\""))? @@ -338,14 +338,13 @@ impl TargetMatrixArgs { let matrix_target = m.to_image_target(); let matrix_string = matrix_target.to_string(); - return self - .target + self.target .iter() .any(|t| t.parse::().unwrap() == matrix_target) || self .target .iter() - .any(|t| wildmatch::WildMatch::new(t).matches(&matrix_string)); + .any(|t| wildmatch::WildMatch::new(t).matches(&matrix_string)) }) }; if let Some(std) = self.std {