From 786a33dd2cf322bd03ffd268ed466d1b50f3c691 Mon Sep 17 00:00:00 2001 From: xtqqczze <45661989+xtqqczze@users.noreply.github.com> Date: Wed, 21 Jan 2026 17:29:29 +0000 Subject: [PATCH] Merge pull request #10404 from xtqqczze/cargo-shear deps: remove unused rust deps --- Cargo.lock | 21 --------------------- Cargo.toml | 4 +++- fuzz/Cargo.lock | 27 --------------------------- src/uu/base32/Cargo.toml | 1 - src/uu/cksum/Cargo.toml | 1 - src/uu/cp/Cargo.toml | 1 - src/uu/cut/Cargo.toml | 1 - src/uu/factor/Cargo.toml | 1 - src/uu/hashsum/Cargo.toml | 2 -- src/uu/mkfifo/Cargo.toml | 1 - src/uu/more/Cargo.toml | 1 - src/uu/numfmt/Cargo.toml | 1 - src/uu/seq/Cargo.toml | 1 - src/uu/shuf/Cargo.toml | 1 - src/uu/sort/Cargo.toml | 1 - src/uu/tail/Cargo.toml | 1 - src/uu/tsort/Cargo.toml | 1 - src/uu/unexpand/Cargo.toml | 1 - src/uu/uniq/Cargo.toml | 1 - src/uu/uptime/Cargo.toml | 1 - src/uu/yes/Cargo.toml | 1 - src/uucore/Cargo.toml | 1 - 22 files changed, 3 insertions(+), 69 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index e92defb61..1a976a105 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -538,7 +538,6 @@ dependencies = [ "rlimit", "rstest", "selinux", - "serde", "sha1", "tempfile", "textwrap", @@ -3080,7 +3079,6 @@ dependencies = [ name = "uu_base32" version = "0.6.0" dependencies = [ - "base64-simd", "clap", "fluent", "uucore", @@ -3190,7 +3188,6 @@ dependencies = [ "clap", "codspeed-divan-compat", "fluent", - "tempfile", "uucore", ] @@ -3219,7 +3216,6 @@ dependencies = [ "thiserror 2.0.18", "uucore", "walkdir", - "xattr", ] [[package]] @@ -3242,7 +3238,6 @@ dependencies = [ "codspeed-divan-compat", "fluent", "memchr", - "tempfile", "uucore", ] @@ -3388,7 +3383,6 @@ dependencies = [ "num-bigint", "num-prime", "num-traits", - "rand 0.9.2", "uucore", ] @@ -3439,9 +3433,7 @@ name = "uu_hashsum" version = "0.6.0" dependencies = [ "clap", - "codspeed-divan-compat", "fluent", - "tempfile", "uucore", ] @@ -3588,7 +3580,6 @@ version = "0.6.0" dependencies = [ "clap", "fluent", - "libc", "nix", "uucore", ] @@ -3622,7 +3613,6 @@ dependencies = [ "clap", "crossterm", "fluent", - "nix", "tempfile", "uucore", ] @@ -3694,7 +3684,6 @@ dependencies = [ "clap", "codspeed-divan-compat", "fluent", - "tempfile", "thiserror 2.0.18", "uucore", ] @@ -3855,7 +3844,6 @@ dependencies = [ "fluent", "num-bigint", "num-traits", - "tempfile", "thiserror 2.0.18", "uucore", ] @@ -3880,7 +3868,6 @@ dependencies = [ "fluent", "rand 0.9.2", "rand_core 0.9.5", - "tempfile", "uucore", ] @@ -3913,7 +3900,6 @@ dependencies = [ "self_cell", "tempfile", "thiserror 2.0.18", - "unicode-width 0.2.2", "uucore", ] @@ -4018,7 +4004,6 @@ dependencies = [ "rstest", "same-file", "uucore", - "winapi-util", "windows-sys 0.61.2", ] @@ -4106,7 +4091,6 @@ dependencies = [ "fluent", "nix", "string-interner", - "tempfile", "thiserror 2.0.18", "uucore", ] @@ -4140,7 +4124,6 @@ dependencies = [ "fluent", "tempfile", "thiserror 2.0.18", - "unicode-width 0.2.2", "uucore", ] @@ -4151,7 +4134,6 @@ dependencies = [ "clap", "codspeed-divan-compat", "fluent", - "tempfile", "uucore", ] @@ -4172,7 +4154,6 @@ dependencies = [ "fluent", "jiff", "thiserror 2.0.18", - "utmp-classic", "uucore", ] @@ -4237,7 +4218,6 @@ dependencies = [ "clap", "fluent", "itertools 0.14.0", - "nix", "uucore", ] @@ -4275,7 +4255,6 @@ dependencies = [ "nix", "num-traits", "os_display", - "phf", "procfs", "selinux", "sha1", diff --git a/Cargo.toml b/Cargo.toml index e1f7083cd..773d4518b 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -571,7 +571,6 @@ xattr.workspace = true # Used in test_uptime::test_uptime_with_file_containing_valid_boot_time_utmpx_record # to deserialize an utmpx struct into a binary file [target.'cfg(all(target_family= "unix",not(target_os = "macos")))'.dev-dependencies] -serde = { version = "1.0.202", features = ["derive"] } wincode = "0.2.5" wincode-derive = "0.2.3" @@ -678,3 +677,6 @@ format_push_string = "allow" flat_map_option = "allow" from_iter_instead_of_collect = "allow" large_types_passed_by_value = "allow" + +[workspace.metadata.cargo-shear] +ignored = ["fluent", "libstdbuf"] diff --git a/fuzz/Cargo.lock b/fuzz/Cargo.lock index 1ec35d314..8bf1a6e84 100644 --- a/fuzz/Cargo.lock +++ b/fuzz/Cargo.lock @@ -1107,25 +1107,6 @@ dependencies = [ "winnow", ] -[[package]] -name = "phf" -version = "0.13.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c1562dc717473dbaa4c1f85a36410e03c047b2e7df7f45ee938fbef64ae7fadf" -dependencies = [ - "phf_shared", - "serde", -] - -[[package]] -name = "phf_shared" -version = "0.13.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e57fef6bc5981e38c2ce2d63bfa546861309f875b8a75f092d1d54ae2d64f266" -dependencies = [ - "siphasher", -] - [[package]] name = "pkg-config" version = "0.3.32" @@ -1391,12 +1372,6 @@ version = "2.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bbbb5d9659141646ae647b42fe094daf6c6192d1620870b449d9557f748b2daa" -[[package]] -name = "siphasher" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "56199f7ddabf13fe5074ce809e7d3f42b42ae711800501b5b16ea82ad029c39d" - [[package]] name = "sm3" version = "0.4.2" @@ -1692,7 +1667,6 @@ dependencies = [ "self_cell", "tempfile", "thiserror", - "unicode-width", "uucore", ] @@ -1773,7 +1747,6 @@ dependencies = [ "nix", "num-traits", "os_display", - "phf", "procfs", "sha1", "sha2", diff --git a/src/uu/base32/Cargo.toml b/src/uu/base32/Cargo.toml index fe51e6865..2318911b5 100644 --- a/src/uu/base32/Cargo.toml +++ b/src/uu/base32/Cargo.toml @@ -21,7 +21,6 @@ path = "src/base32.rs" clap = { workspace = true } uucore = { workspace = true, features = ["encoding"] } fluent = { workspace = true } -base64-simd = "0.8" [[bin]] name = "base32" diff --git a/src/uu/cksum/Cargo.toml b/src/uu/cksum/Cargo.toml index 840397273..1c343181c 100644 --- a/src/uu/cksum/Cargo.toml +++ b/src/uu/cksum/Cargo.toml @@ -29,7 +29,6 @@ fluent = { workspace = true } [dev-dependencies] divan = { workspace = true } -tempfile = { workspace = true } uucore = { workspace = true, features = ["benchmark"] } [[bin]] diff --git a/src/uu/cp/Cargo.toml b/src/uu/cp/Cargo.toml index 8a2391e55..592b9cba9 100644 --- a/src/uu/cp/Cargo.toml +++ b/src/uu/cp/Cargo.toml @@ -39,7 +39,6 @@ thiserror = { workspace = true } fluent = { workspace = true } [target.'cfg(unix)'.dependencies] -xattr = { workspace = true } exacl = { workspace = true, optional = true } [[bin]] diff --git a/src/uu/cut/Cargo.toml b/src/uu/cut/Cargo.toml index 0133180f0..f7ea5b203 100644 --- a/src/uu/cut/Cargo.toml +++ b/src/uu/cut/Cargo.toml @@ -26,7 +26,6 @@ fluent = { workspace = true } [dev-dependencies] divan = { workspace = true } -tempfile = { workspace = true } uucore = { workspace = true, features = ["benchmark"] } [[bin]] diff --git a/src/uu/factor/Cargo.toml b/src/uu/factor/Cargo.toml index ef672bf93..15d09f7a0 100644 --- a/src/uu/factor/Cargo.toml +++ b/src/uu/factor/Cargo.toml @@ -31,7 +31,6 @@ path = "src/main.rs" [dev-dependencies] divan = { workspace = true } -rand = { workspace = true } uucore = { workspace = true, features = ["benchmark"] } [lib] diff --git a/src/uu/hashsum/Cargo.toml b/src/uu/hashsum/Cargo.toml index f77c2c52d..4c28a1588 100644 --- a/src/uu/hashsum/Cargo.toml +++ b/src/uu/hashsum/Cargo.toml @@ -27,6 +27,4 @@ name = "hashsum" path = "src/main.rs" [dev-dependencies] -divan = { workspace = true } -tempfile = { workspace = true } uucore = { workspace = true, features = ["benchmark"] } diff --git a/src/uu/mkfifo/Cargo.toml b/src/uu/mkfifo/Cargo.toml index 900614344..c75638482 100644 --- a/src/uu/mkfifo/Cargo.toml +++ b/src/uu/mkfifo/Cargo.toml @@ -19,7 +19,6 @@ path = "src/mkfifo.rs" [dependencies] clap = { workspace = true } -libc = { workspace = true } nix = { workspace = true, features = ["fs"] } uucore = { workspace = true, features = ["fs", "mode"] } fluent = { workspace = true } diff --git a/src/uu/more/Cargo.toml b/src/uu/more/Cargo.toml index cd65f7412..e296dcf80 100644 --- a/src/uu/more/Cargo.toml +++ b/src/uu/more/Cargo.toml @@ -24,7 +24,6 @@ crossterm = { workspace = true } fluent = { workspace = true } [target.'cfg(all(unix, not(target_os = "fuchsia")))'.dependencies] -nix = { workspace = true } [target.'cfg(target_os = "macos")'.dependencies] crossterm = { workspace = true, features = ["use-dev-tty"] } diff --git a/src/uu/numfmt/Cargo.toml b/src/uu/numfmt/Cargo.toml index 177f2e3b8..fed39ad68 100644 --- a/src/uu/numfmt/Cargo.toml +++ b/src/uu/numfmt/Cargo.toml @@ -25,7 +25,6 @@ fluent = { workspace = true } [dev-dependencies] divan = { workspace = true } -tempfile = { workspace = true } uucore = { workspace = true, features = ["benchmark"] } [[bin]] diff --git a/src/uu/seq/Cargo.toml b/src/uu/seq/Cargo.toml index 534b675e1..cdc1c29af 100644 --- a/src/uu/seq/Cargo.toml +++ b/src/uu/seq/Cargo.toml @@ -40,7 +40,6 @@ path = "src/main.rs" [dev-dependencies] divan = { workspace = true } -tempfile = { workspace = true } uucore = { workspace = true, features = ["benchmark"] } [[bench]] diff --git a/src/uu/shuf/Cargo.toml b/src/uu/shuf/Cargo.toml index b67b1d808..26a270b88 100644 --- a/src/uu/shuf/Cargo.toml +++ b/src/uu/shuf/Cargo.toml @@ -34,5 +34,4 @@ harness = false [dev-dependencies] divan = { workspace = true } -tempfile = { workspace = true } uucore = { workspace = true, features = ["benchmark"] } diff --git a/src/uu/sort/Cargo.toml b/src/uu/sort/Cargo.toml index ad1dcc118..ae537ed02 100644 --- a/src/uu/sort/Cargo.toml +++ b/src/uu/sort/Cargo.toml @@ -35,7 +35,6 @@ rayon = { workspace = true } self_cell = { workspace = true } tempfile = { workspace = true } thiserror = { workspace = true } -unicode-width = { workspace = true } uucore = { workspace = true, features = [ "fs", "parser-size", diff --git a/src/uu/tail/Cargo.toml b/src/uu/tail/Cargo.toml index 055b62400..f01b4f603 100644 --- a/src/uu/tail/Cargo.toml +++ b/src/uu/tail/Cargo.toml @@ -35,7 +35,6 @@ windows-sys = { workspace = true, features = [ "Win32_System_Threading", "Win32_Foundation", ] } -winapi-util = { workspace = true } [dev-dependencies] rstest = { workspace = true } diff --git a/src/uu/tsort/Cargo.toml b/src/uu/tsort/Cargo.toml index 72559199c..a7e2eb014 100644 --- a/src/uu/tsort/Cargo.toml +++ b/src/uu/tsort/Cargo.toml @@ -32,7 +32,6 @@ path = "src/main.rs" [dev-dependencies] divan = { workspace = true } -tempfile = { workspace = true } uucore = { workspace = true, features = ["benchmark"] } [[bench]] diff --git a/src/uu/unexpand/Cargo.toml b/src/uu/unexpand/Cargo.toml index 19128ad03..d7ea1533b 100644 --- a/src/uu/unexpand/Cargo.toml +++ b/src/uu/unexpand/Cargo.toml @@ -20,7 +20,6 @@ path = "src/unexpand.rs" [dependencies] thiserror = { workspace = true } clap = { workspace = true } -unicode-width = { workspace = true } uucore = { workspace = true } fluent = { workspace = true } diff --git a/src/uu/uniq/Cargo.toml b/src/uu/uniq/Cargo.toml index 59a463071..0bd197827 100644 --- a/src/uu/uniq/Cargo.toml +++ b/src/uu/uniq/Cargo.toml @@ -24,7 +24,6 @@ fluent = { workspace = true } [dev-dependencies] divan = { workspace = true } -tempfile = { workspace = true } uucore = { workspace = true, features = ["benchmark", "parser"] } [[bin]] diff --git a/src/uu/uptime/Cargo.toml b/src/uu/uptime/Cargo.toml index 651b342cd..026039026 100644 --- a/src/uu/uptime/Cargo.toml +++ b/src/uu/uptime/Cargo.toml @@ -30,7 +30,6 @@ fluent = { workspace = true } jiff = { workspace = true } [target.'cfg(target_os = "openbsd")'.dependencies] -utmp-classic = { workspace = true } [[bin]] name = "uptime" diff --git a/src/uu/yes/Cargo.toml b/src/uu/yes/Cargo.toml index 3b6e8d08f..33623c7c9 100644 --- a/src/uu/yes/Cargo.toml +++ b/src/uu/yes/Cargo.toml @@ -24,7 +24,6 @@ fluent = { workspace = true } [target.'cfg(unix)'.dependencies] uucore = { workspace = true, features = ["pipes", "signals"] } -nix = { workspace = true } [target.'cfg(not(unix))'.dependencies] uucore = { workspace = true, features = ["pipes"] } diff --git a/src/uucore/Cargo.toml b/src/uucore/Cargo.toml index 06b192dfe..e27e1d70e 100644 --- a/src/uucore/Cargo.toml +++ b/src/uucore/Cargo.toml @@ -26,7 +26,6 @@ bstr = { workspace = true, optional = true } clap = { workspace = true } uucore_procs = { workspace = true } unit-prefix = { workspace = true, optional = true } -phf = { workspace = true } dns-lookup = { workspace = true, optional = true } dunce = { version = "1.0.4", optional = true } glob = { workspace = true, optional = true }