From 1ce6906808f071611544378bd020bfae405282e6 Mon Sep 17 00:00:00 2001 From: Thayne McCombs Date: Sun, 18 Aug 2024 22:55:28 -0600 Subject: [PATCH 01/13] Prepare for 10.2.0 release --- CHANGELOG.md | 5 ++++- Cargo.lock | 2 +- Cargo.toml | 2 +- README.md | 2 ++ 4 files changed, 8 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index fb7e9378d..26c43bf66 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,4 @@ -# Upcoming release +# 10.2.0 ## Features @@ -10,6 +10,9 @@ ## Changes +- Build windows releases with rust 1.77 so windows 7 is still supported +- Deb packages now include symlink for fdfind to be more consistent with official packages + ## Other diff --git a/Cargo.lock b/Cargo.lock index 3fbdb102f..d2ba92a6a 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -314,7 +314,7 @@ checksum = "9fc0510504f03c51ada170672ac806f1f105a88aa97a5281117e1ddc3368e51a" [[package]] name = "fd-find" -version = "10.1.0" +version = "10.2.0" dependencies = [ "aho-corasick", "anyhow", diff --git a/Cargo.toml b/Cargo.toml index f60835a70..3568f7c54 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -16,7 +16,7 @@ license = "MIT OR Apache-2.0" name = "fd-find" readme = "README.md" repository = "https://github.com/sharkdp/fd" -version = "10.1.0" +version = "10.2.0" edition= "2021" rust-version = "1.77.2" diff --git a/README.md b/README.md index feba47f66..1fe42b8e3 100644 --- a/README.md +++ b/README.md @@ -329,6 +329,8 @@ Options: -X, --exec-batch ... Execute a command with all search results at once -c, --color When to use colors [default: auto] [possible values: auto, always, never] + --hyperlink[=] Add hyperlinks to output paths [default: never] [possible + values: auto, always, never] -h, --help Print help (see more with '--help') -V, --version Print version ``` From e3d4f57e75c5aec6fe7b2cfa8d3728b32f1b19d4 Mon Sep 17 00:00:00 2001 From: Thayne McCombs Date: Mon, 19 Aug 2024 23:29:02 -0600 Subject: [PATCH 02/13] Bump dependencies In particular, lscolors --- Cargo.lock | 296 ++++++++++++++++++++++++++++------------------------- Cargo.toml | 2 +- 2 files changed, 156 insertions(+), 142 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index d2ba92a6a..150a5f897 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -28,9 +28,9 @@ dependencies = [ [[package]] name = "anstream" -version = "0.6.14" +version = "0.6.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "418c75fa768af9c03be99d17643f93f79bbba589895012a80e3452a19ddda15b" +checksum = "64e15c1ab1f89faffbf04a634d5e1962e9074f2741eef6d97f3c4e322426d526" dependencies = [ "anstyle", "anstyle-parse", @@ -43,33 +43,33 @@ dependencies = [ [[package]] name = "anstyle" -version = "1.0.7" +version = "1.0.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "038dfcf04a5feb68e9c60b21c9625a54c2c0616e79b72b0fd87075a056ae1d1b" +checksum = "1bec1de6f59aedf83baf9ff929c98f2ad654b97c9510f4e70cf6f661d49fd5b1" [[package]] name = "anstyle-parse" -version = "0.2.4" +version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c03a11a9034d92058ceb6ee011ce58af4a9bf61491aa7e1e59ecd24bd40d22d4" +checksum = "eb47de1e80c2b463c735db5b217a0ddc39d612e7ac9e2e96a5aed1f57616c1cb" dependencies = [ "utf8parse", ] [[package]] name = "anstyle-query" -version = "1.0.3" +version = "1.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a64c907d4e79225ac72e2a354c9ce84d50ebb4586dee56c82b3ee73004f537f5" +checksum = "6d36fc52c7f6c869915e99412912f22093507da8d9e942ceaf66fe4b7c14422a" dependencies = [ "windows-sys 0.52.0", ] [[package]] name = "anstyle-wincon" -version = "3.0.3" +version = "3.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "61a38449feb7068f52bb06c12759005cf459ee52bb4adc1d5a7c4322d716fb19" +checksum = "5bf74e1b6e971609db8ca7a9ce79fd5768ab6ae46441c572e46cf596f59e57f8" dependencies = [ "anstyle", "windows-sys 0.52.0", @@ -106,15 +106,15 @@ checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" [[package]] name = "bitflags" -version = "2.5.0" +version = "2.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf4b9d6a944f767f8e5e0db018570623c85f3d925ac718db4e06d0187adb21c1" +checksum = "b048fb63fd8b5923fc5aa7b340d8e156aec7ec02f0c78fa8a6ddc2613f6f71de" [[package]] name = "bstr" -version = "1.9.1" +version = "1.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05efc5cfd9110c8416e471df0e96702d58690178e206e61b7173706673c93706" +checksum = "40723b8fb387abc38f4f4a37c09073622e41dd12327033091ef8950659e6dc0c" dependencies = [ "memchr", "serde", @@ -128,9 +128,12 @@ checksum = "79296716171880943b8470b5f8d03aa55eb2e645a4874bdbb28adb49162e012c" [[package]] name = "cc" -version = "1.0.96" +version = "1.1.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "065a29261d53ba54260972629f9ca6bffa69bac13cd1fed61420f7fa68b9f8bd" +checksum = "72db2f7947ecee9b03b510377e8bb9077afa27176fdbff55c51027e976fdcc48" +dependencies = [ + "shlex", +] [[package]] name = "cfg-if" @@ -138,12 +141,6 @@ version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" -[[package]] -name = "cfg_aliases" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fd16c4719339c4530435d38e511904438d07cce7950afa3718a84ac36c10e89e" - [[package]] name = "cfg_aliases" version = "0.2.1" @@ -159,14 +156,14 @@ dependencies = [ "android-tzdata", "iana-time-zone", "num-traits", - "windows-targets 0.52.5", + "windows-targets 0.52.6", ] [[package]] name = "clap" -version = "4.5.13" +version = "4.5.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fbb260a053428790f3de475e304ff84cdbc4face759ea7a3e64c1edd938a7fc" +checksum = "ed6719fffa43d0d87e5fd8caeab59be1554fb028cd30edc88fc4369b17971019" dependencies = [ "clap_builder", "clap_derive", @@ -174,9 +171,9 @@ dependencies = [ [[package]] name = "clap_builder" -version = "4.5.13" +version = "4.5.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "64b17d7ea74e9f833c7dbf2cbe4fb12ff26783eda4782a8975b72f895c9b4d99" +checksum = "216aec2b177652e3846684cbfe25c9964d18ec45234f0f5da5157b207ed1aab6" dependencies = [ "anstream", "anstyle", @@ -187,9 +184,9 @@ dependencies = [ [[package]] name = "clap_complete" -version = "4.5.8" +version = "4.5.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b4be9c4c4b1f30b78d8a750e0822b6a6102d97e62061c583a6c1dea2dfb33ae" +checksum = "7eddf1c00919f37952199f7dbc834789cd33356ed10278ee40c8572b8fb88cf2" dependencies = [ "clap", ] @@ -208,21 +205,21 @@ dependencies = [ [[package]] name = "clap_lex" -version = "0.7.0" +version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "98cc8fbded0c607b7ba9dd60cd98df59af97e84d24e49c8557331cfc26d301ce" +checksum = "1462739cb27611015575c0c11df5df7601141071f07518d56fcc1be504cbec97" [[package]] name = "colorchoice" -version = "1.0.1" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b6a852b24ab71dffc585bcb46eaf7959d175cb865a7152e35b348d1b2960422" +checksum = "d3fd119d74b830634cea2a0f58bbd0d54540518a14397557951e79340abc28c0" [[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 = "crossbeam-channel" @@ -254,18 +251,18 @@ dependencies = [ [[package]] name = "crossbeam-utils" -version = "0.8.19" +version = "0.8.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "248e3bacc7dc6baa3b21e405ee045c3047101a49145e7e9eca583ab4c2ca5345" +checksum = "22ec99545bb0ed0ea7bb9b8e1e9122ea386ff8a48c0922e43f36d45ab09e0e80" [[package]] name = "ctrlc" -version = "3.4.4" +version = "3.4.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "672465ae37dc1bc6380a6547a8883d5dd397b0f1faaad4f265726cc7042a5345" +checksum = "90eeab0aa92f3f9b4e87f258c72b139c207d251f9cbc1080a0086b86a8870dd3" dependencies = [ - "nix 0.28.0", - "windows-sys 0.52.0", + "nix 0.29.0", + "windows-sys 0.59.0", ] [[package]] @@ -276,9 +273,9 @@ checksum = "56254986775e3233ffa9c4d7d3faaf6d36a2c09d30b20687e9f88bc8bafc16c8" [[package]] name = "errno" -version = "0.3.8" +version = "0.3.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a258e46cdc063eb8519c00b9fc845fc47bcfca4130e2f08e88665ceda8474245" +checksum = "534c5cf6194dfab3db3242765c03bbe257cf92f22b38f6bc0c58d59108a820ba" dependencies = [ "libc", "windows-sys 0.52.0", @@ -346,14 +343,14 @@ dependencies = [ [[package]] name = "filetime" -version = "0.2.23" +version = "0.2.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ee447700ac8aa0b2f2bd7bc4462ad686ba06baa6727ac149a2d6277f0d240fd" +checksum = "bf401df4a4e3872c4fe8151134cf483738e74b67fc934d6532c882b3d24a4550" dependencies = [ "cfg-if", "libc", - "redox_syscall", - "windows-sys 0.52.0", + "libredox", + "windows-sys 0.59.0", ] [[package]] @@ -431,9 +428,9 @@ dependencies = [ [[package]] name = "is_terminal_polyfill" -version = "1.70.0" +version = "1.70.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f8478577c03552c21db0e2724ffb8986a5ce7af88107e6be5d2ee6e158c12800" +checksum = "7943c866cc5cd64cbc25b2e01621d07fa8eb2a1a23160ee81ce38704e97b8ecf" [[package]] name = "jemalloc-sys" @@ -457,51 +454,63 @@ dependencies = [ [[package]] name = "js-sys" -version = "0.3.69" +version = "0.3.70" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "29c15563dc2726973df627357ce0c9ddddbea194836909d655df6a75d2cf296d" +checksum = "1868808506b929d7b0cfa8f75951347aa71bb21144b7791bae35d9bccfcfe37a" dependencies = [ "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.155" +version = "0.2.158" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97b3888a4aecf77e811145cadf6eef5901f4782c53886191b2f693f24761847c" +checksum = "d8adc4bb1803a324070e64a98ae98f38934d91957a99cfb3a43dcbc01bc56439" + +[[package]] +name = "libredox" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c0ff37bd590ca25063e35af745c343cb7a0271906fb7b37e4813e8f79f00268d" +dependencies = [ + "bitflags 2.6.0", + "libc", + "redox_syscall", +] [[package]] name = "linux-raw-sys" -version = "0.4.13" +version = "0.4.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "01cda141df6706de531b6c46c3a33ecca755538219bd484262fa09410c13539c" +checksum = "78b3ae25bc7c8c38cec158d1f2757ee79e9b3740fbc7ccf0e59e4b08d793fa89" [[package]] name = "log" -version = "0.4.21" +version = "0.4.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "90ed8c1e510134f979dbc4f070f87d4313098b704861a105fe34231c70a3901c" +checksum = "a7a70ba024b9dc04c27ea2f0c0548feb474ec5c54bba33a7f72f873a39d07b24" [[package]] name = "lscolors" -version = "0.18.0" +version = "0.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "02a5d67fc8a616f260ee9a36868547da09ac24178a4b84708cd8ea781372fbe4" +checksum = "55f5f3bc18b481c70c416920f4bb02f7df64b99dbee36d8445027042a273ab84" dependencies = [ + "aho-corasick", "nu-ansi-term", ] [[package]] name = "memchr" -version = "2.7.2" +version = "2.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c8640c5d730cb13ebd907d8d04b52f55ac9a2eec55b440c8892f40d56c76c1d" +checksum = "78ca9ab1a0babb1e7d5695e3530886289c18cf2f87ec19a575a0abdce112e3a3" [[package]] name = "nix" @@ -514,37 +523,25 @@ dependencies = [ "libc", ] -[[package]] -name = "nix" -version = "0.28.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ab2156c4fce2f8df6c499cc1c763e4394b7482525bf2a9701c9d79d215f519e4" -dependencies = [ - "bitflags 2.5.0", - "cfg-if", - "cfg_aliases 0.1.1", - "libc", -] - [[package]] name = "nix" version = "0.29.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "71e2746dc3a24dd78b3cfcb7be93368c6de9963d30f43a6a73998a9cf4b17b46" dependencies = [ - "bitflags 2.5.0", + "bitflags 2.6.0", "cfg-if", - "cfg_aliases 0.2.1", + "cfg_aliases", "libc", ] [[package]] name = "normpath" -version = "1.2.0" +version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5831952a9476f2fed74b77d74182fa5ddc4d21c72ec45a333b250e3ed0272804" +checksum = "c8911957c4b1549ac0dc74e30db9c8b0e66ddcd6d7acc33098f4c63a64a6d7ed" dependencies = [ - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] [[package]] @@ -573,9 +570,9 @@ checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92" [[package]] name = "proc-macro2" -version = "1.0.81" +version = "1.0.86" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3d1597b0c024618f09a9c3b8655b7e430397a36d23fdafec26d6965e9eec3eba" +checksum = "5e719e8df665df0d1c8fbfd238015744736151d4445ec0836b8e628aae103b77" dependencies = [ "unicode-ident", ] @@ -591,18 +588,18 @@ dependencies = [ [[package]] name = "redox_syscall" -version = "0.4.1" +version = "0.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4722d768eff46b75989dd134e5c353f0d6296e5aaa3132e776cbdb56be7731aa" +checksum = "2a908a6e00f1fdd0dfd9c0eb08ce85126f6d8bbda50017e74bc4a4b7d4a926a4" dependencies = [ - "bitflags 1.3.2", + "bitflags 2.6.0", ] [[package]] name = "regex" -version = "1.10.5" +version = "1.10.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b91213439dad192326a0d7c6ee3955910425f441d7038e0d6933b0aec5c4517f" +checksum = "4219d74c6b67a3654a9fbebc4b419e22126d13d2f3c4a07ee0cb61ff79a79619" dependencies = [ "aho-corasick", "memchr", @@ -612,9 +609,9 @@ dependencies = [ [[package]] name = "regex-automata" -version = "0.4.6" +version = "0.4.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "86b83b8b9847f9bf95ef68afb0b8e6cdb80f498442f5179a29fad448fcc1eaea" +checksum = "38caf58cc5ef2fed281f89292ef23f6365465ed9a41b7a7754eb4e26496c92df" dependencies = [ "aho-corasick", "memchr", @@ -633,7 +630,7 @@ version = "0.38.34" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "70dc5ec042f7a43c4a73241207cecc9873a06d45debb38b329f8541d85c2730f" dependencies = [ - "bitflags 2.5.0", + "bitflags 2.6.0", "errno", "libc", "linux-raw-sys", @@ -651,24 +648,30 @@ dependencies = [ [[package]] name = "serde" -version = "1.0.200" +version = "1.0.208" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ddc6f9cc94d67c0e21aaf7eda3a010fd3af78ebf6e096aa6e2e13c79749cce4f" +checksum = "cff085d2cb684faa248efb494c39b68e522822ac0de72ccf08109abde717cfb2" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.200" +version = "1.0.208" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "856f046b9400cee3c8c94ed572ecdb752444c24528c035cd35882aad6f492bcb" +checksum = "24008e81ff7613ed8e5ba0cfaf24e2c2f1e5b8a0495711e44fcd4882fca62bcf" dependencies = [ "proc-macro2", "quote", "syn", ] +[[package]] +name = "shlex" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64" + [[package]] name = "strsim" version = "0.11.1" @@ -677,9 +680,9 @@ checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f" [[package]] name = "syn" -version = "2.0.60" +version = "2.0.75" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "909518bc7b1c9b779f1bbf07f2929d35af9f0f37e47c6e9ef7f9dddc1e1821f3" +checksum = "f6af063034fc1935ede7be0122941bafa9bacb949334d090b77ca98b5817c7d9" dependencies = [ "proc-macro2", "quote", @@ -688,14 +691,15 @@ dependencies = [ [[package]] name = "tempfile" -version = "3.10.1" +version = "3.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85b77fafb263dd9d05cbeac119526425676db3784113aa9295c88498cbf8bff1" +checksum = "04cbcdd0c794ebb0d4cf35e88edd2f7d2c4c3e9a5a6dab322839b321c6a87a64" dependencies = [ "cfg-if", "fastrand", + "once_cell", "rustix", - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] [[package]] @@ -749,9 +753,9 @@ checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" [[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 = "version_check" @@ -771,19 +775,20 @@ dependencies = [ [[package]] name = "wasm-bindgen" -version = "0.2.92" +version = "0.2.93" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4be2531df63900aeb2bca0daaaddec08491ee64ceecbee5076636a3b026795a8" +checksum = "a82edfc16a6c469f5f44dc7b571814045d60404b55a0ee849f9bcfa2e63dd9b5" dependencies = [ "cfg-if", + "once_cell", "wasm-bindgen-macro", ] [[package]] name = "wasm-bindgen-backend" -version = "0.2.92" +version = "0.2.93" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "614d787b966d3989fa7bb98a654e369c762374fd3213d212cfc0251257e747da" +checksum = "9de396da306523044d3302746f1208fa71d7532227f15e347e2d93e4145dd77b" dependencies = [ "bumpalo", "log", @@ -796,9 +801,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro" -version = "0.2.92" +version = "0.2.93" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1f8823de937b71b9460c0c34e25f3da88250760bec0ebac694b49997550d726" +checksum = "585c4c91a46b072c92e908d99cb1dcdf95c5218eeb6f3bf1efa991ee7a68cccf" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -806,9 +811,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.92" +version = "0.2.93" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e94f17b526d0a461a191c78ea52bbce64071ed5c04c9ffe424dcb38f74171bb7" +checksum = "afc340c74d9005395cf9dd098506f7f44e38f2b4a21c6aaacf9a105ea5e1e836" dependencies = [ "proc-macro2", "quote", @@ -819,9 +824,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-shared" -version = "0.2.92" +version = "0.2.93" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af190c94f2773fdb3729c55b007a722abb5384da03bc0986df4c289bf5567e96" +checksum = "c62a0a307cb4a311d3a07867860911ca130c3494e8c2719593806c08bc5d0484" [[package]] name = "winapi" @@ -841,11 +846,11 @@ checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" [[package]] name = "winapi-util" -version = "0.1.8" +version = "0.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4d4cc384e1e73b93bafa6fb4f1df8c41695c8a91cf9c4c64358067d15a7b6c6b" +checksum = "cf221c93e13a30d793f7645a0e7762c55d169dbb0a49671918a2319d289b10bb" dependencies = [ - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] [[package]] @@ -860,7 +865,7 @@ version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "33ab640c8d7e35bf8ba19b884ba838ceb4fba93a4e8c65a9059d08afcfc683d9" dependencies = [ - "windows-targets 0.52.5", + "windows-targets 0.52.6", ] [[package]] @@ -878,7 +883,16 @@ version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" dependencies = [ - "windows-targets 0.52.5", + "windows-targets 0.52.6", +] + +[[package]] +name = "windows-sys" +version = "0.59.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e38bc4d79ed67fd075bcc251a1c39b32a1776bbe92e5bef1f0bf1f8c531853b" +dependencies = [ + "windows-targets 0.52.6", ] [[package]] @@ -898,18 +912,18 @@ dependencies = [ [[package]] name = "windows-targets" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6f0713a46559409d202e70e28227288446bf7841d3211583a4b53e3f6d96e7eb" +checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973" dependencies = [ - "windows_aarch64_gnullvm 0.52.5", - "windows_aarch64_msvc 0.52.5", - "windows_i686_gnu 0.52.5", + "windows_aarch64_gnullvm 0.52.6", + "windows_aarch64_msvc 0.52.6", + "windows_i686_gnu 0.52.6", "windows_i686_gnullvm", - "windows_i686_msvc 0.52.5", - "windows_x86_64_gnu 0.52.5", - "windows_x86_64_gnullvm 0.52.5", - "windows_x86_64_msvc 0.52.5", + "windows_i686_msvc 0.52.6", + "windows_x86_64_gnu 0.52.6", + "windows_x86_64_gnullvm 0.52.6", + "windows_x86_64_msvc 0.52.6", ] [[package]] @@ -920,9 +934,9 @@ checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" [[package]] name = "windows_aarch64_gnullvm" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7088eed71e8b8dda258ecc8bac5fb1153c5cffaf2578fc8ff5d61e23578d3263" +checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3" [[package]] name = "windows_aarch64_msvc" @@ -932,9 +946,9 @@ checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" [[package]] name = "windows_aarch64_msvc" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9985fd1504e250c615ca5f281c3f7a6da76213ebd5ccc9561496568a2752afb6" +checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469" [[package]] name = "windows_i686_gnu" @@ -944,15 +958,15 @@ checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" [[package]] name = "windows_i686_gnu" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "88ba073cf16d5372720ec942a8ccbf61626074c6d4dd2e745299726ce8b89670" +checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b" [[package]] name = "windows_i686_gnullvm" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87f4261229030a858f36b459e748ae97545d6f1ec60e5e0d6a3d32e0dc232ee9" +checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66" [[package]] name = "windows_i686_msvc" @@ -962,9 +976,9 @@ checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" [[package]] name = "windows_i686_msvc" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "db3c2bf3d13d5b658be73463284eaf12830ac9a26a90c717b7f771dfe97487bf" +checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66" [[package]] name = "windows_x86_64_gnu" @@ -974,9 +988,9 @@ checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" [[package]] name = "windows_x86_64_gnu" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4e4246f76bdeff09eb48875a0fd3e2af6aada79d409d33011886d3e1581517d9" +checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78" [[package]] name = "windows_x86_64_gnullvm" @@ -986,9 +1000,9 @@ checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" [[package]] name = "windows_x86_64_gnullvm" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "852298e482cd67c356ddd9570386e2862b5673c85bd5f88df9ab6802b334c596" +checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d" [[package]] name = "windows_x86_64_msvc" @@ -998,6 +1012,6 @@ checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" [[package]] name = "windows_x86_64_msvc" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bec47e5bfd1bff0eeaf6d8b485cc1074891a197ab4225d504cb7a1ab88b02bf0" +checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" diff --git a/Cargo.toml b/Cargo.toml index 3568f7c54..5a72bba3e 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -60,7 +60,7 @@ default-features = false features = ["std", "clock"] [dependencies.lscolors] -version = "0.18" +version = "0.19" default-features = false features = ["nu-ansi-term"] From 9b1017a4d58bb5a71ee625a5d8fc9ae4ff0377e5 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sun, 1 Sep 2024 17:23:19 +0000 Subject: [PATCH 03/13] build(deps): bump filetime from 0.2.24 to 0.2.25 Bumps [filetime](https://github.com/alexcrichton/filetime) from 0.2.24 to 0.2.25. - [Commits](https://github.com/alexcrichton/filetime/compare/0.2.24...0.2.25) --- updated-dependencies: - dependency-name: filetime dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- Cargo.lock | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 150a5f897..bdd3dadc6 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -343,9 +343,9 @@ dependencies = [ [[package]] name = "filetime" -version = "0.2.24" +version = "0.2.25" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bf401df4a4e3872c4fe8151134cf483738e74b67fc934d6532c882b3d24a4550" +checksum = "35c0522e981e68cbfa8c3f978441a5f34b30b96e146b33cd3359176b50fe8586" dependencies = [ "cfg-if", "libc", From 96ac5fa0a00a420b74c07fd29dd2550b4c48e623 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sun, 1 Sep 2024 17:23:24 +0000 Subject: [PATCH 04/13] build(deps): bump clap_complete from 4.5.19 to 4.5.24 Bumps [clap_complete](https://github.com/clap-rs/clap) from 4.5.19 to 4.5.24. - [Release notes](https://github.com/clap-rs/clap/releases) - [Changelog](https://github.com/clap-rs/clap/blob/master/CHANGELOG.md) - [Commits](https://github.com/clap-rs/clap/compare/clap_complete-v4.5.19...clap_complete-v4.5.24) --- updated-dependencies: - dependency-name: clap_complete dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- Cargo.lock | 4 ++-- Cargo.toml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 150a5f897..193e007b4 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -184,9 +184,9 @@ dependencies = [ [[package]] name = "clap_complete" -version = "4.5.19" +version = "4.5.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7eddf1c00919f37952199f7dbc834789cd33356ed10278ee40c8572b8fb88cf2" +checksum = "6d7db6eca8c205649e8d3ccd05aa5042b1800a784e56bc7c43524fde8abbfa9b" dependencies = [ "clap", ] diff --git a/Cargo.toml b/Cargo.toml index 5a72bba3e..67d56ac56 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -47,7 +47,7 @@ anyhow = "1.0" etcetera = "0.8" normpath = "1.1.1" crossbeam-channel = "0.5.13" -clap_complete = {version = "4.5.8", optional = true} +clap_complete = {version = "4.5.24", optional = true} faccess = "0.2.4" [dependencies.clap] From 27c6b5091924485b2fd4c2d784dc9cf5f91d3f5a Mon Sep 17 00:00:00 2001 From: Thayne McCombs Date: Mon, 23 Sep 2024 01:17:43 -0600 Subject: [PATCH 05/13] Fix a new clippy warning --- src/regex_helper.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/regex_helper.rs b/src/regex_helper.rs index 39878f544..b86bbefe3 100644 --- a/src/regex_helper.rs +++ b/src/regex_helper.rs @@ -67,7 +67,7 @@ fn hir_matches_strings_with_leading_dot(hir: &Hir) -> bool { if let Some(hir) = hirs.next() { match hir.kind() { - HirKind::Literal(Literal(bytes)) => bytes.starts_with(&[b'.']), + HirKind::Literal(Literal(bytes)) => bytes.starts_with(b"."), _ => false, } } else { From a4b3bd29aa02d68b5cca3e29dea2d719c4f32df8 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 1 Oct 2024 17:17:44 +0000 Subject: [PATCH 06/13] build(deps): bump clap_complete from 4.5.24 to 4.5.28 Bumps [clap_complete](https://github.com/clap-rs/clap) from 4.5.24 to 4.5.28. - [Release notes](https://github.com/clap-rs/clap/releases) - [Changelog](https://github.com/clap-rs/clap/blob/master/CHANGELOG.md) - [Commits](https://github.com/clap-rs/clap/compare/clap_complete-v4.5.24...clap_complete-v4.5.28) --- updated-dependencies: - dependency-name: clap_complete dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- Cargo.lock | 4 ++-- Cargo.toml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index b2ec512b1..d5a243d0b 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -184,9 +184,9 @@ dependencies = [ [[package]] name = "clap_complete" -version = "4.5.24" +version = "4.5.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6d7db6eca8c205649e8d3ccd05aa5042b1800a784e56bc7c43524fde8abbfa9b" +checksum = "9b378c786d3bde9442d2c6dd7e6080b2a818db2b96e30d6e7f1b6d224eb617d3" dependencies = [ "clap", ] diff --git a/Cargo.toml b/Cargo.toml index 67d56ac56..98ea290ce 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -47,7 +47,7 @@ anyhow = "1.0" etcetera = "0.8" normpath = "1.1.1" crossbeam-channel = "0.5.13" -clap_complete = {version = "4.5.24", optional = true} +clap_complete = {version = "4.5.28", optional = true} faccess = "0.2.4" [dependencies.clap] From 85764e28efe7fc10ab9435e344ca4bb1cb1e9152 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 1 Oct 2024 17:17:51 +0000 Subject: [PATCH 07/13] build(deps): bump globset from 0.4.14 to 0.4.15 Bumps [globset](https://github.com/BurntSushi/ripgrep) from 0.4.14 to 0.4.15. - [Release notes](https://github.com/BurntSushi/ripgrep/releases) - [Changelog](https://github.com/BurntSushi/ripgrep/blob/master/CHANGELOG.md) - [Commits](https://github.com/BurntSushi/ripgrep/compare/globset-0.4.14...ignore-0.4.15) --- updated-dependencies: - dependency-name: globset dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- Cargo.lock | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index b2ec512b1..b1d9afc05 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -355,9 +355,9 @@ dependencies = [ [[package]] name = "globset" -version = "0.4.14" +version = "0.4.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "57da3b9b5b85bd66f31093f8c408b90a74431672542466497dcbdfdc02034be1" +checksum = "15f1ce686646e7f1e19bf7d5533fe443a45dbfb990e00629110797578b42fb19" dependencies = [ "aho-corasick", "bstr", From 5de01fdd7b97bbc4f3ed19e367b830e705d36edc Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 1 Oct 2024 17:17:55 +0000 Subject: [PATCH 08/13] build(deps): bump libc from 0.2.158 to 0.2.159 Bumps [libc](https://github.com/rust-lang/libc) from 0.2.158 to 0.2.159. - [Release notes](https://github.com/rust-lang/libc/releases) - [Changelog](https://github.com/rust-lang/libc/blob/0.2.159/CHANGELOG.md) - [Commits](https://github.com/rust-lang/libc/compare/0.2.158...0.2.159) --- updated-dependencies: - dependency-name: libc dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- Cargo.lock | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index b2ec512b1..778ded108 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -469,9 +469,9 @@ checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe" [[package]] name = "libc" -version = "0.2.158" +version = "0.2.159" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d8adc4bb1803a324070e64a98ae98f38934d91957a99cfb3a43dcbc01bc56439" +checksum = "561d97a539a36e26a9a5fad1ea11a3039a67714694aaa379433e580854bc3dc5" [[package]] name = "libredox" From aa81800ffa44d4980e5f655890e4fbf4b852e4a5 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 1 Oct 2024 17:18:00 +0000 Subject: [PATCH 09/13] build(deps): bump ignore from 0.4.22 to 0.4.23 Bumps [ignore](https://github.com/BurntSushi/ripgrep) from 0.4.22 to 0.4.23. - [Release notes](https://github.com/BurntSushi/ripgrep/releases) - [Changelog](https://github.com/BurntSushi/ripgrep/blob/master/CHANGELOG.md) - [Commits](https://github.com/BurntSushi/ripgrep/commits) --- updated-dependencies: - dependency-name: ignore dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- Cargo.lock | 8 ++++---- Cargo.toml | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index b2ec512b1..7a64ccbff 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -355,9 +355,9 @@ dependencies = [ [[package]] name = "globset" -version = "0.4.14" +version = "0.4.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "57da3b9b5b85bd66f31093f8c408b90a74431672542466497dcbdfdc02034be1" +checksum = "15f1ce686646e7f1e19bf7d5533fe443a45dbfb990e00629110797578b42fb19" dependencies = [ "aho-corasick", "bstr", @@ -412,9 +412,9 @@ dependencies = [ [[package]] name = "ignore" -version = "0.4.22" +version = "0.4.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b46810df39e66e925525d6e38ce1e7f6e1d208f72dc39757880fcb66e2c58af1" +checksum = "6d89fd380afde86567dfba715db065673989d6253f42b88179abd3eae47bda4b" dependencies = [ "crossbeam-deque", "globset", diff --git a/Cargo.toml b/Cargo.toml index 67d56ac56..f963b5010 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -37,7 +37,7 @@ version_check = "0.9" aho-corasick = "1.1" nu-ansi-term = "0.50" argmax = "0.3.1" -ignore = "0.4.22" +ignore = "0.4.23" regex = "1.10.5" regex-syntax = "0.8" ctrlc = "3.2" From bd9882d797bfcb03208331ce7b9821dc6eac6eb6 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 2 Oct 2024 04:27:23 +0000 Subject: [PATCH 10/13] build(deps): bump anyhow from 1.0.86 to 1.0.89 Bumps [anyhow](https://github.com/dtolnay/anyhow) from 1.0.86 to 1.0.89. - [Release notes](https://github.com/dtolnay/anyhow/releases) - [Commits](https://github.com/dtolnay/anyhow/compare/1.0.86...1.0.89) --- updated-dependencies: - dependency-name: anyhow dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- Cargo.lock | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 3138d88d8..821567b67 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -77,9 +77,9 @@ dependencies = [ [[package]] name = "anyhow" -version = "1.0.86" +version = "1.0.89" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b3d1d046238990b9cf5bcde22a3fb3584ee5cf65fb2765f454ed428c7a0063da" +checksum = "86fdf8605db99b54d3cd748a44c6d04df638eb5dafb219b135d0149bd0db01f6" [[package]] name = "argmax" From 0d99badc1b2571e13359a09fbb1ff8e07c193cbe Mon Sep 17 00:00:00 2001 From: Collin Styles Date: Sun, 22 Sep 2024 21:37:05 -0700 Subject: [PATCH 11/13] Add a hidden `--mindepth` alias for `--min-depth` --- CHANGELOG.md | 16 ++++++++++++++++ src/cli.rs | 1 + tests/tests.rs | 1 + 3 files changed, 18 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 26c43bf66..e891da1f7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,19 @@ +# Upcoming release + +## Features + +- Add a hidden `--mindepth` alias for `--min-depth`. (#1617) + + +## Bugfixes + + +## Changes + + +## Other + + # 10.2.0 ## Features diff --git a/src/cli.rs b/src/cli.rs index 9bdbcc7d4..b45ef12dc 100644 --- a/src/cli.rs +++ b/src/cli.rs @@ -275,6 +275,7 @@ pub struct Opts { long, value_name = "depth", hide_short_help = true, + alias("mindepth"), help = "Only show search results starting at the given depth.", long_help )] diff --git a/tests/tests.rs b/tests/tests.rs index 3d11cdcda..c6ffe694a 100644 --- a/tests/tests.rs +++ b/tests/tests.rs @@ -2527,6 +2527,7 @@ fn test_number_parsing_errors() { te.assert_failure(&["--threads=0"]); te.assert_failure(&["--min-depth=a"]); + te.assert_failure(&["--mindepth=a"]); te.assert_failure(&["--max-depth=a"]); te.assert_failure(&["--maxdepth=a"]); te.assert_failure(&["--exact-depth=a"]); From 4bdee80afa3db69c080ebc6ff977ee18e277da12 Mon Sep 17 00:00:00 2001 From: Hamir Mahal Date: Sun, 6 Oct 2024 09:33:58 -0700 Subject: [PATCH 12/13] style: simplify string formatting for readability --- build.rs | 2 +- src/exec/command.rs | 2 +- src/filter/time.rs | 8 ++++---- src/hyperlink.rs | 2 +- src/main.rs | 2 +- src/output.rs | 4 ++-- src/walk.rs | 7 +++---- tests/testenv/mod.rs | 8 ++++---- tests/tests.rs | 14 +++++++------- 9 files changed, 24 insertions(+), 25 deletions(-) diff --git a/build.rs b/build.rs index 5a4c3726a..ed75430ae 100644 --- a/build.rs +++ b/build.rs @@ -5,7 +5,7 @@ fn main() { Some(true) => {} // rustc version too small or can't figure it out _ => { - eprintln!("'fd' requires rustc >= {}", min_version); + eprintln!("'fd' requires rustc >= {min_version}"); std::process::exit(1); } } diff --git a/src/exec/command.rs b/src/exec/command.rs index ff13f9121..0692166bc 100644 --- a/src/exec/command.rs +++ b/src/exec/command.rs @@ -103,7 +103,7 @@ pub fn handle_cmd_error(cmd: Option<&Command>, err: io::Error) -> ExitCode { ExitCode::GeneralError } (_, err) => { - print_error(format!("Problem while executing command: {}", err)); + print_error(format!("Problem while executing command: {err}")); ExitCode::GeneralError } } diff --git a/src/filter/time.rs b/src/filter/time.rs index a672594ac..02bbad084 100644 --- a/src/filter/time.rs +++ b/src/filter/time.rs @@ -149,21 +149,21 @@ mod tests { // Timestamp only supported via '@' prefix assert!(TimeFilter::before(&ref_time, &ref_timestamp.to_string()).is_none()); assert!( - TimeFilter::before(&ref_time, &format!("@{}", ref_timestamp)) + TimeFilter::before(&ref_time, &format!("@{ref_timestamp}")) .unwrap() .applies_to(&t1m_ago) ); assert!( - !TimeFilter::before(&ref_time, &format!("@{}", ref_timestamp)) + !TimeFilter::before(&ref_time, &format!("@{ref_timestamp}")) .unwrap() .applies_to(&t1s_later) ); assert!( - !TimeFilter::after(&ref_time, &format!("@{}", ref_timestamp)) + !TimeFilter::after(&ref_time, &format!("@{ref_timestamp}")) .unwrap() .applies_to(&t1m_ago) ); - assert!(TimeFilter::after(&ref_time, &format!("@{}", ref_timestamp)) + assert!(TimeFilter::after(&ref_time, &format!("@{ref_timestamp}")) .unwrap() .applies_to(&t1s_later)); } diff --git a/src/hyperlink.rs b/src/hyperlink.rs index 4ddd3efad..f347e384a 100644 --- a/src/hyperlink.rs +++ b/src/hyperlink.rs @@ -35,7 +35,7 @@ fn encode(f: &mut Formatter, byte: u8) -> fmt::Result { #[cfg(windows)] b'\\' => f.write_char('/'), _ => { - write!(f, "%{:02X}", byte) + write!(f, "%{byte:02X}") } } } diff --git a/src/main.rs b/src/main.rs index 88e6b4cb7..d275b2aff 100644 --- a/src/main.rs +++ b/src/main.rs @@ -63,7 +63,7 @@ fn main() { exit_code.exit(); } Err(err) => { - eprintln!("[fd error]: {:#}", err); + eprintln!("[fd error]: {err:#}"); ExitCode::GeneralError.exit(); } } diff --git a/src/output.rs b/src/output.rs index a7d3ecd73..1d53c55f5 100644 --- a/src/output.rs +++ b/src/output.rs @@ -17,7 +17,7 @@ pub fn print_entry(stdout: &mut W, entry: &DirEntry, config: &Config) let mut has_hyperlink = false; if config.hyperlink { if let Some(url) = PathUrl::new(entry.path()) { - write!(stdout, "\x1B]8;;{}\x1B\\", url)?; + write!(stdout, "\x1B]8;;{url}\x1B\\")?; has_hyperlink = true; } } @@ -143,7 +143,7 @@ fn print_entry_uncolorized_base( if let Some(ref separator) = config.path_separator { *path_string.to_mut() = replace_path_separator(&path_string, separator); } - write!(stdout, "{}", path_string)?; + write!(stdout, "{path_string}")?; print_trailing_slash(stdout, entry, config, None) } diff --git a/src/walk.rs b/src/walk.rs index d203702f2..45d949e7c 100644 --- a/src/walk.rs +++ b/src/walk.rs @@ -252,7 +252,7 @@ impl<'a, W: Write> ReceiverBuffer<'a, W> { fn print(&mut self, entry: &DirEntry) -> Result<(), ExitCode> { if let Err(e) = output::print_entry(&mut self.stdout, entry, self.config) { if e.kind() != ::std::io::ErrorKind::BrokenPipe { - print_error(format!("Could not write to output: {}", e)); + print_error(format!("Could not write to output: {e}")); return Err(ExitCode::GeneralError); } } @@ -377,8 +377,7 @@ impl WorkerState { Some(ignore::Error::Partial(_)) => (), Some(err) => { print_error(format!( - "Malformed pattern in global ignore file. {}.", - err + "Malformed pattern in global ignore file. {err}." )); } None => (), @@ -392,7 +391,7 @@ impl WorkerState { match result { Some(ignore::Error::Partial(_)) => (), Some(err) => { - print_error(format!("Malformed pattern in custom ignore file. {}.", err)); + print_error(format!("Malformed pattern in custom ignore file. {err}.")); } None => (), } diff --git a/tests/testenv/mod.rs b/tests/testenv/mod.rs index d40ab2fa8..04c25b5ca 100644 --- a/tests/testenv/mod.rs +++ b/tests/testenv/mod.rs @@ -104,9 +104,9 @@ fn format_output_error(args: &[&str], expected: &str, actual: &str) -> String { let diff_text = diff::lines(expected, actual) .into_iter() .map(|diff| match diff { - diff::Result::Left(l) => format!("-{}", l), - diff::Result::Both(l, _) => format!(" {}", l), - diff::Result::Right(r) => format!("+{}", r), + diff::Result::Left(l) => format!("-{l}"), + diff::Result::Both(l, _) => format!(" {l}"), + diff::Result::Right(r) => format!("+{r}"), }) .collect::>() .join("\n"); @@ -290,7 +290,7 @@ impl TestEnv { pub fn assert_failure_with_error(&self, args: &[&str], expected: &str) { let status = self.assert_error_subdirectory(".", args, Some(expected)); if status.success() { - panic!("error '{}' did not occur.", expected); + panic!("error '{expected}' did not occur."); } } diff --git a/tests/tests.rs b/tests/tests.rs index c6ffe694a..bc25c73a6 100644 --- a/tests/tests.rs +++ b/tests/tests.rs @@ -597,7 +597,7 @@ fn test_full_path() { te.assert_output( &[ "--full-path", - &format!("^{prefix}.*three.*foo$", prefix = prefix), + &format!("^{prefix}.*three.*foo$"), ], "one/two/three/d.foo one/two/three/directory_foo/", @@ -1518,7 +1518,7 @@ fn test_symlink_as_absolute_root() { let (te, abs_path) = get_test_env_with_abs_path(DEFAULT_DIRS, DEFAULT_FILES); te.assert_output( - &["", &format!("{abs_path}/symlink", abs_path = abs_path)], + &["", &format!("{abs_path}/symlink")], &format!( "{abs_path}/symlink/c.foo {abs_path}/symlink/C.Foo2 @@ -1543,7 +1543,7 @@ fn test_symlink_and_full_path() { &[ "--absolute-path", "--full-path", - &format!("^{prefix}.*three", prefix = prefix), + &format!("^{prefix}.*three"), ], &format!( "{abs_path}/{expected_path}/three/ @@ -1563,8 +1563,8 @@ fn test_symlink_and_full_path_abs_path() { te.assert_output( &[ "--full-path", - &format!("^{prefix}.*symlink.*three", prefix = prefix), - &format!("{abs_path}/symlink", abs_path = abs_path), + &format!("^{prefix}.*symlink.*three"), + &format!("{abs_path}/symlink"), ], &format!( "{abs_path}/symlink/three/ @@ -2337,7 +2337,7 @@ fn test_owner_current_user() { fn test_owner_current_group() { let te = TestEnv::new(DEFAULT_DIRS, DEFAULT_FILES); let gid = Gid::current(); - te.assert_output(&["--owner", &format!(":{}", gid), "a.foo"], "a.foo"); + te.assert_output(&["--owner", &format!(":{gid}"), "a.foo"], "a.foo"); if let Ok(Some(group)) = Group::from_gid(gid) { te.assert_output(&["--owner", &format!(":{}", group.name), "a.foo"], "a.foo"); } @@ -2616,7 +2616,7 @@ fn test_invalid_cwd() { .unwrap(); if !output.status.success() { - panic!("{:?}", output); + panic!("{output:?}"); } } From 87f230a66e5aef0cc87a5bb5202758f0a5459714 Mon Sep 17 00:00:00 2001 From: Hamir Mahal Date: Sun, 6 Oct 2024 09:34:41 -0700 Subject: [PATCH 13/13] fix: formatting in `src/` and `tests/` --- src/filter/time.rs | 24 +++++++++--------------- src/walk.rs | 4 +--- tests/tests.rs | 5 +---- 3 files changed, 11 insertions(+), 22 deletions(-) diff --git a/src/filter/time.rs b/src/filter/time.rs index 02bbad084..cd1754258 100644 --- a/src/filter/time.rs +++ b/src/filter/time.rs @@ -148,21 +148,15 @@ mod tests { let t1s_later = ref_time + Duration::from_secs(1); // Timestamp only supported via '@' prefix assert!(TimeFilter::before(&ref_time, &ref_timestamp.to_string()).is_none()); - assert!( - TimeFilter::before(&ref_time, &format!("@{ref_timestamp}")) - .unwrap() - .applies_to(&t1m_ago) - ); - assert!( - !TimeFilter::before(&ref_time, &format!("@{ref_timestamp}")) - .unwrap() - .applies_to(&t1s_later) - ); - assert!( - !TimeFilter::after(&ref_time, &format!("@{ref_timestamp}")) - .unwrap() - .applies_to(&t1m_ago) - ); + assert!(TimeFilter::before(&ref_time, &format!("@{ref_timestamp}")) + .unwrap() + .applies_to(&t1m_ago)); + assert!(!TimeFilter::before(&ref_time, &format!("@{ref_timestamp}")) + .unwrap() + .applies_to(&t1s_later)); + assert!(!TimeFilter::after(&ref_time, &format!("@{ref_timestamp}")) + .unwrap() + .applies_to(&t1m_ago)); assert!(TimeFilter::after(&ref_time, &format!("@{ref_timestamp}")) .unwrap() .applies_to(&t1s_later)); diff --git a/src/walk.rs b/src/walk.rs index 45d949e7c..a98bdffd0 100644 --- a/src/walk.rs +++ b/src/walk.rs @@ -376,9 +376,7 @@ impl WorkerState { match result { Some(ignore::Error::Partial(_)) => (), Some(err) => { - print_error(format!( - "Malformed pattern in global ignore file. {err}." - )); + print_error(format!("Malformed pattern in global ignore file. {err}.")); } None => (), } diff --git a/tests/tests.rs b/tests/tests.rs index bc25c73a6..81010cfa8 100644 --- a/tests/tests.rs +++ b/tests/tests.rs @@ -595,10 +595,7 @@ fn test_full_path() { let prefix = escape(&root.to_string_lossy()); te.assert_output( - &[ - "--full-path", - &format!("^{prefix}.*three.*foo$"), - ], + &["--full-path", &format!("^{prefix}.*three.*foo$")], "one/two/three/d.foo one/two/three/directory_foo/", );