diff --git a/.clippy.toml b/.clippy.toml index 16caf02ee..22fd4be73 100644 --- a/.clippy.toml +++ b/.clippy.toml @@ -1 +1 @@ -msrv = "1.60.0" +msrv = "1.64.0" diff --git a/.github/workflows/CICD.yml b/.github/workflows/CICD.yml index 9c2faa0f4..b1b8dca54 100644 --- a/.github/workflows/CICD.yml +++ b/.github/workflows/CICD.yml @@ -11,7 +11,7 @@ env: PROJECT_NAME: coreutils PROJECT_DESC: "Core universal (cross-platform) utilities" PROJECT_AUTH: "uutils" - RUST_MIN_SRV: "1.60.0" ## MSRV v1.60.0 + RUST_MIN_SRV: "1.64.0" # * style job configuration STYLE_FAIL_ON_FAULT: true ## (bool) fail the build if a style job contains a fault (error or warning); may be overridden on a per-job basis diff --git a/Cargo.lock b/Cargo.lock index 6b838a518..3b664bc0d 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -128,13 +128,13 @@ checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" [[package]] name = "blake2b_simd" -version = "1.0.0" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "72936ee4afc7f8f736d1c38383b56480b5497b4617b4a77bdbf1d2ababc76127" +checksum = "3c2f0dc9a68c6317d884f97cc36cf5a3d20ba14ce404227df55e1af708ab04bc" dependencies = [ "arrayref", "arrayvec", - "constant_time_eq 0.1.5", + "constant_time_eq", ] [[package]] @@ -147,7 +147,7 @@ dependencies = [ "arrayvec", "cc", "cfg-if", - "constant_time_eq 0.2.4", + "constant_time_eq", "digest", ] @@ -246,7 +246,7 @@ dependencies = [ "once_cell", "strsim", "termcolor", - "terminal_size 0.2.2", + "terminal_size", ] [[package]] @@ -285,24 +285,17 @@ checksum = "120133d4db2ec47efe2e26502ee984747630c67f51974fca0b6c1340cf2368d3" [[package]] name = "console" -version = "0.15.2" +version = "0.15.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c050367d967ced717c04b65d8c619d863ef9292ce0c5760028655a2fb298718c" +checksum = "c3d79fbe8970a77e3e34151cc13d3b3e248aa0faaecb9f6091fa07ebefe5ad60" dependencies = [ "encode_unicode", "lazy_static", "libc", - "terminal_size 0.1.17", "unicode-width", - "winapi", + "windows-sys", ] -[[package]] -name = "constant_time_eq" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "245097e9a4535ee1e3e3931fcfcd55a796a44c643e8596ff6566d68f09b87bbc" - [[package]] name = "constant_time_eq" version = "0.2.4" @@ -571,7 +564,7 @@ dependencies = [ "autocfg", "cfg-if", "crossbeam-utils", - "memoffset 0.7.1", + "memoffset", "scopeguard", ] @@ -637,12 +630,12 @@ dependencies = [ [[package]] name = "ctrlc" -version = "3.2.3" +version = "3.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d91974fbbe88ec1df0c24a4f00f99583667a7e2e6272b2b92d294d81e462173" +checksum = "1631ca6e3c59112501a9d87fd86f21591ff77acd31331e8a73f8d80a65bbdd71" dependencies = [ "nix", - "winapi", + "windows-sys", ] [[package]] @@ -1095,9 +1088,9 @@ dependencies = [ [[package]] name = "indicatif" -version = "0.17.2" +version = "0.17.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4295cbb7573c16d310e99e713cf9e75101eb190ab31fccd35f2d2691b4352b19" +checksum = "cef509aa9bc73864d6756f0d34d35504af3cf0844373afe9b8669a5b8005a729" dependencies = [ "console", "number_prefix", @@ -1207,9 +1200,9 @@ checksum = "830d08ce1d1d941e6b30645f1a0eb5643013d835ce3779a5fc208261dbe10f55" [[package]] name = "libc" -version = "0.2.137" +version = "0.2.139" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fc7fcc620a3bff7cdd7a365be3376c97191aeaccc2a603e600951e452615bf89" +checksum = "201de327520df007757c1f0adce6e827fe8562fbc28bfd9c15571c66ca1f5f79" [[package]] name = "libloading" @@ -1294,15 +1287,6 @@ dependencies = [ "libc", ] -[[package]] -name = "memoffset" -version = "0.6.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5aa361d4faea93603064a027415f07bd8e1d5c88c9fbf68bf56a285428fd79ce" -dependencies = [ - "autocfg", -] - [[package]] name = "memoffset" version = "0.7.1" @@ -1341,16 +1325,14 @@ dependencies = [ [[package]] name = "nix" -version = "0.25.0" +version = "0.26.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e322c04a9e3440c327fca7b6c8a63e6890a32fa2ad689db972425f07e0d22abb" +checksum = "bfdda3d196821d6af13126e40375cdf7da646a96114af134d5f417a9a1dc8e1a" dependencies = [ - "autocfg", "bitflags", "cfg-if", "libc", - "memoffset 0.6.5", - "pin-utils", + "static_assertions", ] [[package]] @@ -1843,25 +1825,6 @@ dependencies = [ "winapi", ] -[[package]] -name = "remove_dir_all" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "882f368737489ea543bc5c340e6f3d34a28c39980bd9a979e47322b26f60ac40" -dependencies = [ - "libc", - "log", - "num_cpus", - "rayon", - "winapi", -] - -[[package]] -name = "retain_mut" -version = "0.1.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8c31b5c4033f8fdde8700e4657be2c497e7288f01515be52168c631e2e4d4086" - [[package]] name = "rlimit" version = "0.8.3" @@ -2106,6 +2069,12 @@ dependencies = [ "winapi", ] +[[package]] +name = "static_assertions" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" + [[package]] name = "strsim" version = "0.10.0" @@ -2158,7 +2127,7 @@ dependencies = [ "fastrand", "libc", "redox_syscall", - "remove_dir_all 0.5.3", + "remove_dir_all", "winapi", ] @@ -2180,16 +2149,6 @@ dependencies = [ "winapi-util", ] -[[package]] -name = "terminal_size" -version = "0.1.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "633c1a546cee861a1a6d0dc69ebeca693bf4296661ba7852b9d21d159e0506df" -dependencies = [ - "libc", - "winapi", -] - [[package]] name = "terminal_size" version = "0.2.2" @@ -2207,7 +2166,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "222a222a5bfe1bba4a77b45ec488a741b3cb8872e5e499451fd7d0129c9c7c3d" dependencies = [ "smawk", - "terminal_size 0.2.2", + "terminal_size", "unicode-linebreak", "unicode-width", ] @@ -2749,7 +2708,7 @@ dependencies = [ "once_cell", "selinux", "term_grid", - "terminal_size 0.2.2", + "terminal_size", "unicode-width", "uucore", ] @@ -2970,7 +2929,6 @@ version = "0.0.17" dependencies = [ "clap", "libc", - "remove_dir_all 0.7.0", "uucore", "walkdir", "windows-sys", @@ -3152,7 +3110,6 @@ version = "0.0.17" dependencies = [ "clap", "libc", - "retain_mut", "uucore", ] diff --git a/Cargo.toml b/Cargo.toml index 90cc76f4d..679f96d25 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,7 +1,7 @@ # coreutils (uutils) # * see the repository LICENSE, README, and CONTRIBUTING files for more information -# spell-checker:ignore (libs) libselinux gethostid procfs +# spell-checker:ignore (libs) libselinux gethostid procfs bigdecimal kqueue [package] name = "coreutils" @@ -16,7 +16,7 @@ repository = "https://github.com/uutils/coreutils" readme = "README.md" keywords = ["coreutils", "uutils", "cross-platform", "cli", "utility"] categories = ["command-line-utilities"] -rust-version = "1.60.0" +rust-version = "1.64.0" edition = "2021" build = "build.rs" @@ -262,17 +262,90 @@ feat_os_windows_legacy = [ # * bypass/override ~ translate 'test' feature name to avoid dependency collision with rust core 'test' crate (o/w surfaces as compiler errors during testing) test = [ "uu_test" ] -[workspace] - -[dependencies] +[workspace.dependencies] +atty = "0.2" +bigdecimal = "0.3" +binary-heap-plus = "0.5.0" +bstr = "1.0" +bytecount = "0.6.3" +byteorder = "1.3.2" +chrono = { version="^0.4.23", default-features=false, features=["std", "alloc", "clock"]} clap = { version = "4.0", features = ["wrap_help", "cargo"] } clap_complete = "4.0" +compare = "0.1.0" +coz = { version = "0.1.3" } +crossterm = ">=0.19" +ctrlc = { version = "3.0", features = ["termination"] } +exacl = "0.9.0" +file_diff = "1.0.0" +filetime = "0.2" +fnv = "1.0.7" +fs_extra = "1.1.0" +fts-sys = "0.2" +gcd = "2.2" +glob = "0.3.0" +half = "2.1" +indicatif = "0.17" +itertools = "0.10.0" +libc = "0.2.139" +lscolors = { version = "0.13.0", default-features=false, features = ["nu-ansi-term"] } +memchr = "2" +nix = { version="0.26", default-features=false } +nom = "7.1.1" +notify = { version = "=5.0.0", features=["macos_kqueue"]} +num_cpus = "1.14" +num-bigint = "0.4.0" +num-traits = "0.2.15" +number_prefix = "0.4" once_cell = "1.13.1" +onig = { version = "~6.4", default-features = false } +ouroboros = "0.15.5" phf = "0.11.1" -selinux = { version="0.3", optional = true } +phf_codegen = "0.11.1" +platform-info = "1.0.2" +quick-error = "2.0.1" +rand = { version = "0.8", features = ["small_rng"] } +rand_core = "0.6" +rayon = "1.5" +redox_syscall = "0.2" +regex = "1.7.1" +rust-ini = "0.18.0" +same-file = "1.0.6" +selinux = "0.3" +signal-hook = "0.3.14" +smallvec = { version = "1.10", features = ["union"] } +strum = "0.24.1" +strum_macros = "0.24.2" +tempfile = "3.3.0" +term_grid = "0.1.5" +terminal_size = "0.2.2" textwrap = { version="0.16.0", features=["terminal_size"] } +thiserror = "1.0" +time = { version="0.3" } +unicode-segmentation = "1.9.0" +unicode-width = "0.1.8" +utf-8 = "0.7.6" +walkdir = "2.2" +winapi-util = "0.1.5" +windows-sys = { version="0.42.0", default-features=false } +xattr = "0.2.3" +zip = { version = "0.6.3", default_features=false, features=["deflate"] } + uucore = { version=">=0.0.17", package="uucore", path="src/uucore" } -zip = { version = "0.6.3", optional=true, default_features=false, features=["deflate"] } +uucore_procs = { version=">=0.0.17", package="uucore_procs", path="src/uucore_procs" } +uu_ls = { version=">=0.0.17", path="src/uu/ls" } +uu_base32 = { version=">=0.0.17", path="src/uu/base32"} + +[dependencies] +clap = { workspace=true } +once_cell = { workspace=true } +uucore = { workspace=true } +clap_complete = { workspace=true } +phf = { workspace=true } +selinux = { workspace=true, optional = true } +textwrap = { workspace=true } +zip = { workspace=true, optional = true } + # * uutils uu_test = { optional=true, version="0.0.17", package="uu_test", path="src/uu/test" } # @@ -388,21 +461,21 @@ yes = { optional=true, version="0.0.17", package="uu_yes", path="src/uu/yes #pin_cc = { version="1.0.61, < 1.0.62", package="cc" } ## cc v1.0.62 has compiler errors for MinRustV v1.32.0, requires 1.34 (for `std::str::split_ascii_whitespace()`) [dev-dependencies] -chrono = { version="^0.4.23", default-features=false, features=["std", "alloc", "clock"]} +chrono = { workspace=true } conv = "0.3" -filetime = "0.2" -glob = "0.3.0" -libc = "0.2" +filetime = { workspace=true } +glob = { workspace=true } +libc = { workspace=true } pretty_assertions = "1" -rand = "0.8" -regex = "1.7" +rand = { workspace=true } +regex = { workspace=true } sha1 = { version="0.10", features=["std"] } -tempfile = "3" -time = {version="0.3", features=["local-offset"]} +tempfile = { workspace=true } +time = { workspace=true, features=["local-offset"] } unindent = "0.1" -uucore = { version=">=0.0.17", package="uucore", path="src/uucore", features=["entries", "process", "signals"] } -walkdir = "2.2" -atty = "0.2" +uucore = { workspace=true, features=["entries", "process", "signals"] } +walkdir = { workspace=true } +atty = { workspace=true } hex-literal = "0.3.1" rstest = "0.16.0" @@ -411,12 +484,12 @@ procfs = { version = "0.14", default-features = false } rlimit = "0.8.3" [target.'cfg(unix)'.dev-dependencies] -nix = { version = "0.25", default-features = false, features = ["process", "signal", "user"] } +nix = { workspace=true, features=["process", "signal", "user"] } rust-users = { version="0.11", package="users" } rand_pcg = "0.3" [build-dependencies] -phf_codegen = "0.11.1" +phf_codegen = { workspace=true } [[bin]] name = "coreutils" diff --git a/README.md b/README.md index 6c75db838..66a0395e9 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,7 @@ [![dependency status](https://deps.rs/repo/github/uutils/coreutils/status.svg)](https://deps.rs/repo/github/uutils/coreutils) [![CodeCov](https://codecov.io/gh/uutils/coreutils/branch/master/graph/badge.svg)](https://codecov.io/gh/uutils/coreutils) -![MSRV](https://img.shields.io/badge/MSRV-1.60.0-brightgreen) +![MSRV](https://img.shields.io/badge/MSRV-1.64.0-brightgreen) ----------------------------------------------- @@ -52,7 +52,7 @@ Both can also be generated locally, the instructions for that can be found in th ### Rust Version uutils follows Rust's release channels and is tested against stable, beta and nightly. -The current Minimum Supported Rust Version (MSRV) is `1.60.0`. +The current Minimum Supported Rust Version (MSRV) is `1.64.0`. ## Building diff --git a/deny.toml b/deny.toml index a2578384d..20995c936 100644 --- a/deny.toml +++ b/deny.toml @@ -58,20 +58,7 @@ highlight = "all" # For each duplicate dependency, indicate the name of the dependency which # introduces it. # spell-checker: disable -skip = [ - # blake2d_simd - { name = "arrayvec", version = "=0.7.2" }, - # quickcheck - { name = "env_logger", version = "=0.8.4" }, - # tempfile - { name = "remove_dir_all", version = "=0.5.3" }, - # console (via indicatif) - { name = "terminal_size", version = "=0.1.17" }, - # nix - { name = "memoffset", version = "=0.6.5"}, - # blake2b_simd - { name = "constant_time_eq", version = "=0.1.5"}, -] +skip = [] # spell-checker: enable # This section is considered when running `cargo deny check sources`. diff --git a/docs/src/extensions.md b/docs/src/extensions.md index 56f2edcc9..3e84f70d8 100644 --- a/docs/src/extensions.md +++ b/docs/src/extensions.md @@ -5,6 +5,11 @@ features that are not supported by GNU coreutils. We take care not to introduce features that are incompatible with the GNU coreutils. Below is a list of uutils extensions. +## `env` + +`env` has an additional `-f`/`--file` flag that can parse `.env` files and set +variables accordingly. This feature is adopted from `dotenv` style packages. + ## `cp` `cp` can display a progress bar when the `-g`/`--progress` flag is set. @@ -36,4 +41,5 @@ therefore welcomed. ## `cut` -`cut` can separate fields by whitespace (Space and Tab) with `-w` flag. This feature is adopted from [FreeBSD](https://www.freebsd.org/cgi/man.cgi?cut). \ No newline at end of file +`cut` can separate fields by whitespace (Space and Tab) with `-w` flag. This +feature is adopted from [FreeBSD](https://www.freebsd.org/cgi/man.cgi?cut). diff --git a/src/bin/uudoc.rs b/src/bin/uudoc.rs index fe28323f2..8276d2ae1 100644 --- a/src/bin/uudoc.rs +++ b/src/bin/uudoc.rs @@ -347,7 +347,7 @@ impl<'a, 'b> MDWriter<'a, 'b> { .trim() .to_string(); - if result != "" { + if !result.is_empty() { Some(result) } else { None diff --git a/src/uu/arch/Cargo.toml b/src/uu/arch/Cargo.toml index 5cb68c14f..8e8712338 100644 --- a/src/uu/arch/Cargo.toml +++ b/src/uu/arch/Cargo.toml @@ -15,9 +15,9 @@ edition = "2021" path = "src/arch.rs" [dependencies] -platform-info = "1.0.2" -clap = { version = "4.0", features = ["wrap_help", "cargo"] } -uucore = { version=">=0.0.17", package="uucore", path="../../uucore" } +platform-info = { workspace=true } +clap = { workspace=true } +uucore = { workspace=true } [[bin]] name = "arch" diff --git a/src/uu/base32/Cargo.toml b/src/uu/base32/Cargo.toml index 172ac6086..d71e71f95 100644 --- a/src/uu/base32/Cargo.toml +++ b/src/uu/base32/Cargo.toml @@ -15,8 +15,8 @@ edition = "2021" path = "src/base32.rs" [dependencies] -clap = { version = "4.0", features = ["wrap_help", "cargo"] } -uucore = { version=">=0.0.17", package="uucore", path="../../uucore", features = ["encoding"] } +clap = { workspace=true } +uucore = { workspace=true, features = ["encoding"] } [[bin]] name = "base32" diff --git a/src/uu/base64/Cargo.toml b/src/uu/base64/Cargo.toml index 790af595d..af92c70c2 100644 --- a/src/uu/base64/Cargo.toml +++ b/src/uu/base64/Cargo.toml @@ -15,8 +15,8 @@ edition = "2021" path = "src/base64.rs" [dependencies] -uucore = { version=">=0.0.17", package="uucore", path="../../uucore", features = ["encoding"] } -uu_base32 = { version=">=0.0.17", package="uu_base32", path="../base32"} +uucore = { workspace=true, features = ["encoding"] } +uu_base32 = { workspace=true } [[bin]] name = "base64" diff --git a/src/uu/basename/Cargo.toml b/src/uu/basename/Cargo.toml index ef326334d..7d8377de5 100644 --- a/src/uu/basename/Cargo.toml +++ b/src/uu/basename/Cargo.toml @@ -15,8 +15,8 @@ edition = "2021" path = "src/basename.rs" [dependencies] -clap = { version = "4.0", features = ["wrap_help", "cargo"] } -uucore = { version=">=0.0.17", package="uucore", path="../../uucore" } +clap = { workspace=true } +uucore = { workspace=true } [[bin]] name = "basename" diff --git a/src/uu/basenc/Cargo.toml b/src/uu/basenc/Cargo.toml index b98b3ac9d..e6babef76 100644 --- a/src/uu/basenc/Cargo.toml +++ b/src/uu/basenc/Cargo.toml @@ -15,9 +15,9 @@ edition = "2021" path = "src/basenc.rs" [dependencies] -clap = { version = "4.0", features = ["wrap_help", "cargo"] } -uucore = { version=">=0.0.17", package="uucore", path="../../uucore", features = ["encoding"] } -uu_base32 = { version=">=0.0.17", package="uu_base32", path="../base32"} +clap = { workspace=true } +uucore = { workspace=true, features = ["encoding"] } +uu_base32 = { workspace=true } [[bin]] name = "basenc" diff --git a/src/uu/basenc/src/basenc.rs b/src/uu/basenc/src/basenc.rs index cb9e38879..1bc2aae44 100644 --- a/src/uu/basenc/src/basenc.rs +++ b/src/uu/basenc/src/basenc.rs @@ -20,7 +20,7 @@ use std::io::{stdin, Read}; use uucore::error::UClapError; static ABOUT: &str = "\ -encode/decode data and print to standard output +Encode/decode data and print to standard output With no FILE, or when FILE is -, read standard input. When decoding, the input may contain newlines in addition to the bytes of diff --git a/src/uu/cat/Cargo.toml b/src/uu/cat/Cargo.toml index 524179567..e707c6db0 100644 --- a/src/uu/cat/Cargo.toml +++ b/src/uu/cat/Cargo.toml @@ -15,13 +15,13 @@ edition = "2021" path = "src/cat.rs" [dependencies] -clap = { version = "4.0", features = ["wrap_help", "cargo"] } -thiserror = "1.0" -atty = "0.2" -uucore = { version=">=0.0.17", package="uucore", path="../../uucore", features=["fs", "pipes"] } +clap = { workspace=true } +thiserror = { workspace = true } +atty = { workspace=true } +uucore = { workspace=true, features=["fs", "pipes"] } [target.'cfg(unix)'.dependencies] -nix = { version = "0.25", default-features = false } +nix = { workspace=true } [[bin]] name = "cat" diff --git a/src/uu/chcon/Cargo.toml b/src/uu/chcon/Cargo.toml index a90308af4..2e28aa29e 100644 --- a/src/uu/chcon/Cargo.toml +++ b/src/uu/chcon/Cargo.toml @@ -14,12 +14,12 @@ edition = "2021" path = "src/chcon.rs" [dependencies] -clap = { version = "4.0", features = ["wrap_help", "cargo"] } -uucore = { version = ">=0.0.9", package="uucore", path="../../uucore", features=["entries", "fs", "perms"] } -selinux = { version = "0.3" } -fts-sys = { version = "0.2" } -thiserror = { version = "1.0" } -libc = { version = "0.2" } +clap = { workspace=true } +uucore = { workspace=true, features=["entries", "fs", "perms"] } +selinux = { workspace=true } +thiserror = { workspace = true } +libc = { workspace=true } +fts-sys = { workspace=true } [[bin]] name = "chcon" diff --git a/src/uu/chgrp/Cargo.toml b/src/uu/chgrp/Cargo.toml index de00ba951..164a30e20 100644 --- a/src/uu/chgrp/Cargo.toml +++ b/src/uu/chgrp/Cargo.toml @@ -15,8 +15,8 @@ edition = "2021" path = "src/chgrp.rs" [dependencies] -clap = { version = "4.0", features = ["wrap_help", "cargo"] } -uucore = { version=">=0.0.17", package="uucore", path="../../uucore", features=["entries", "fs", "perms"] } +clap = { workspace=true } +uucore = { workspace=true, features=["entries", "fs", "perms"] } [[bin]] name = "chgrp" diff --git a/src/uu/chmod/Cargo.toml b/src/uu/chmod/Cargo.toml index 52335e13a..833067208 100644 --- a/src/uu/chmod/Cargo.toml +++ b/src/uu/chmod/Cargo.toml @@ -15,9 +15,9 @@ edition = "2021" path = "src/chmod.rs" [dependencies] -clap = { version = "4.0", features = ["wrap_help", "cargo"] } -libc = "0.2.137" -uucore = { version=">=0.0.17", package="uucore", path="../../uucore", features=["fs", "mode"] } +clap = { workspace=true } +libc = { workspace=true } +uucore = { workspace=true, features=["fs", "mode"] } [[bin]] name = "chmod" diff --git a/src/uu/chown/Cargo.toml b/src/uu/chown/Cargo.toml index 79aa2e4c2..9ff43b006 100644 --- a/src/uu/chown/Cargo.toml +++ b/src/uu/chown/Cargo.toml @@ -15,8 +15,8 @@ edition = "2021" path = "src/chown.rs" [dependencies] -clap = { version = "4.0", features = ["wrap_help", "cargo"] } -uucore = { version=">=0.0.17", package="uucore", path="../../uucore", features=["entries", "fs", "perms"] } +clap = { workspace=true } +uucore = { workspace=true, features=["entries", "fs", "perms"] } [[bin]] name = "chown" diff --git a/src/uu/chown/src/chown.rs b/src/uu/chown/src/chown.rs index b2a0dcd85..401703cdf 100644 --- a/src/uu/chown/src/chown.rs +++ b/src/uu/chown/src/chown.rs @@ -19,7 +19,7 @@ use clap::{crate_version, Arg, ArgAction, ArgMatches, Command}; use std::fs; use std::os::unix::fs::MetadataExt; -static ABOUT: &str = "change file owner and group"; +static ABOUT: &str = "Change file owner and group"; const USAGE: &str = "\ {} [OPTION]... [OWNER][:[GROUP]] FILE... diff --git a/src/uu/chroot/Cargo.toml b/src/uu/chroot/Cargo.toml index 4a44f9eaa..0cae53110 100644 --- a/src/uu/chroot/Cargo.toml +++ b/src/uu/chroot/Cargo.toml @@ -15,8 +15,8 @@ edition = "2021" path = "src/chroot.rs" [dependencies] -clap = { version = "4.0", features = ["wrap_help", "cargo"] } -uucore = { version=">=0.0.17", package="uucore", path="../../uucore", features=["entries", "fs"] } +clap = { workspace=true } +uucore = { workspace=true, features=["entries", "fs"] } [[bin]] name = "chroot" diff --git a/src/uu/cksum/Cargo.toml b/src/uu/cksum/Cargo.toml index 52c7dd7cb..4719af074 100644 --- a/src/uu/cksum/Cargo.toml +++ b/src/uu/cksum/Cargo.toml @@ -15,8 +15,8 @@ edition = "2021" path = "src/cksum.rs" [dependencies] -clap = { version = "4.0", features = ["wrap_help", "cargo"] } -uucore = { version=">=0.0.17", package="uucore", path="../../uucore" } +clap = { workspace=true } +uucore = { workspace=true } [[bin]] name = "cksum" diff --git a/src/uu/comm/Cargo.toml b/src/uu/comm/Cargo.toml index eec6711bb..fbe28903f 100644 --- a/src/uu/comm/Cargo.toml +++ b/src/uu/comm/Cargo.toml @@ -15,8 +15,8 @@ edition = "2021" path = "src/comm.rs" [dependencies] -clap = { version = "4.0", features = ["wrap_help", "cargo"] } -uucore = { version=">=0.0.17", package="uucore", path="../../uucore" } +clap = { workspace=true } +uucore = { workspace=true } [[bin]] name = "comm" diff --git a/src/uu/comm/src/comm.rs b/src/uu/comm/src/comm.rs index b91f9ddbc..1ed94cc3e 100644 --- a/src/uu/comm/src/comm.rs +++ b/src/uu/comm/src/comm.rs @@ -17,7 +17,7 @@ use uucore::format_usage; use clap::{crate_version, Arg, ArgAction, ArgMatches, Command}; -static ABOUT: &str = "compare two sorted files line by line"; +static ABOUT: &str = "Compare two sorted files line by line"; static LONG_HELP: &str = ""; const USAGE: &str = "{} [OPTION]... FILE1 FILE2"; diff --git a/src/uu/cp/Cargo.toml b/src/uu/cp/Cargo.toml index 03477e287..4aa871185 100644 --- a/src/uu/cp/Cargo.toml +++ b/src/uu/cp/Cargo.toml @@ -19,18 +19,18 @@ edition = "2021" path = "src/cp.rs" [dependencies] -clap = { version = "4.0", features = ["wrap_help", "cargo"] } -filetime = "0.2" -libc = "0.2.137" -quick-error = "2.0.1" -selinux = { version="0.3", optional=true } -uucore = { version=">=0.0.17", package="uucore", path="../../uucore", features=["entries", "fs", "perms", "mode"] } -walkdir = "2.2" -indicatif = "0.17" +clap = { workspace=true } +filetime = { workspace=true } +libc = { workspace=true } +quick-error = { workspace=true } +selinux = { workspace=true, optional=true } +uucore = { workspace=true, features=["entries", "fs", "perms", "mode"] } +walkdir = { workspace=true } +indicatif = { workspace=true } [target.'cfg(unix)'.dependencies] -xattr="0.2.3" -exacl= { version = "0.9.0", optional=true } +xattr = { workspace=true } +exacl = { workspace=true, optional=true } [[bin]] name = "cp" diff --git a/src/uu/cp/src/cp.rs b/src/uu/cp/src/cp.rs index d9029810d..1b7d58d06 100644 --- a/src/uu/cp/src/cp.rs +++ b/src/uu/cp/src/cp.rs @@ -523,7 +523,7 @@ pub fn uu_app() -> Command { .long(options::SPARSE) .value_name("WHEN") .value_parser(["never", "auto", "always"]) - .help("NotImplemented: control creation of sparse files. See below"), + .help("control creation of sparse files. See below"), ) // TODO: implement the following args .arg( diff --git a/src/uu/csplit/Cargo.toml b/src/uu/csplit/Cargo.toml index 235fcfd2c..62b43c10e 100644 --- a/src/uu/csplit/Cargo.toml +++ b/src/uu/csplit/Cargo.toml @@ -15,10 +15,10 @@ edition = "2021" path = "src/csplit.rs" [dependencies] -clap = { version = "4.0", features = ["wrap_help", "cargo"] } -thiserror = "1.0" -regex = "1.7.1" -uucore = { version=">=0.0.17", package="uucore", path="../../uucore", features=["entries", "fs"] } +clap = { workspace=true } +thiserror = { workspace = true } +regex = { workspace=true } +uucore = { workspace=true, features=["entries", "fs"] } [[bin]] name = "csplit" diff --git a/src/uu/csplit/src/csplit.rs b/src/uu/csplit/src/csplit.rs index 5e3849687..85df5eb28 100644 --- a/src/uu/csplit/src/csplit.rs +++ b/src/uu/csplit/src/csplit.rs @@ -22,7 +22,7 @@ mod split_name; use crate::csplit_error::CsplitError; use crate::split_name::SplitName; -static ABOUT: &str = "split a file into sections determined by context lines"; +static ABOUT: &str = "Split a file into sections determined by context lines"; static LONG_HELP: &str = "Output pieces of FILE separated by PATTERN(s) to files 'xx00', 'xx01', ..., and output byte counts of each piece to standard output."; const USAGE: &str = "{} [OPTION]... FILE PATTERN..."; diff --git a/src/uu/cut/Cargo.toml b/src/uu/cut/Cargo.toml index 9a4a0b950..f680b67e5 100644 --- a/src/uu/cut/Cargo.toml +++ b/src/uu/cut/Cargo.toml @@ -15,11 +15,11 @@ edition = "2021" path = "src/cut.rs" [dependencies] -clap = { version = "4.0", features = ["wrap_help", "cargo"] } -uucore = { version=">=0.0.17", package="uucore", path="../../uucore" } -memchr = "2" -bstr = "1.0" -atty = "0.2" +clap = { workspace=true } +uucore = { workspace=true } +memchr = { workspace=true } +bstr = { workspace=true } +atty = { workspace=true } [[bin]] name = "cut" diff --git a/src/uu/date/Cargo.toml b/src/uu/date/Cargo.toml index 0bedeabb9..cd7c50513 100644 --- a/src/uu/date/Cargo.toml +++ b/src/uu/date/Cargo.toml @@ -15,15 +15,15 @@ edition = "2021" path = "src/date.rs" [dependencies] -chrono = { version="^0.4.23", default-features=false, features=["std", "alloc", "clock"]} -clap = { version = "4.0", features = ["wrap_help", "cargo"] } -uucore = { version=">=0.0.17", package="uucore", path="../../uucore" } +chrono = { workspace=true } +clap = { workspace=true } +uucore = { workspace=true } [target.'cfg(unix)'.dependencies] -libc = "0.2" +libc = { workspace=true } [target.'cfg(windows)'.dependencies] -windows-sys = { version = "0.42.0", default-features = false, features = ["Win32_Foundation", "Win32_System_SystemInformation"] } +windows-sys = { workspace=true, features = ["Win32_Foundation", "Win32_System_SystemInformation"] } [[bin]] name = "date" diff --git a/src/uu/date/src/date.rs b/src/uu/date/src/date.rs index e02d91f1b..f433ce73d 100644 --- a/src/uu/date/src/date.rs +++ b/src/uu/date/src/date.rs @@ -36,7 +36,7 @@ const MINUTE: &str = "minute"; const SECOND: &str = "second"; const NS: &str = "ns"; -const ABOUT: &str = "print or set the system date and time"; +const ABOUT: &str = "Print or set the system date and time"; const USAGE: &str = "\ {} [OPTION]... [+FORMAT]... {} [OPTION]... [MMDDhhmm[[CC]YY][.ss]]"; diff --git a/src/uu/dd/Cargo.toml b/src/uu/dd/Cargo.toml index b269c6990..1cc813bc9 100644 --- a/src/uu/dd/Cargo.toml +++ b/src/uu/dd/Cargo.toml @@ -15,13 +15,13 @@ edition = "2021" path = "src/dd.rs" [dependencies] -clap = { version = "4.0", features = ["wrap_help", "cargo"] } -gcd = "2.2" -libc = "0.2" -uucore = { version=">=0.0.17", package="uucore", path="../../uucore" } +clap = { workspace=true } +gcd = { workspace=true } +libc = { workspace=true } +uucore = { workspace=true } [target.'cfg(any(target_os = "linux", target_os = "android"))'.dependencies] -signal-hook = "0.3.14" +signal-hook = { workspace=true } [[bin]] name = "dd" diff --git a/src/uu/df/Cargo.toml b/src/uu/df/Cargo.toml index 0a229415c..83ae2ae14 100644 --- a/src/uu/df/Cargo.toml +++ b/src/uu/df/Cargo.toml @@ -15,9 +15,9 @@ edition = "2021" path = "src/df.rs" [dependencies] -clap = { version = "4.0", features = ["wrap_help", "cargo"] } -uucore = { version=">=0.0.17", package="uucore", path="../../uucore", features=["libc", "fsext"] } -unicode-width = "0.1.9" +clap = { workspace=true } +uucore = { workspace=true, features=["libc", "fsext"] } +unicode-width = { workspace=true } [[bin]] name = "df" diff --git a/src/uu/df/src/df.rs b/src/uu/df/src/df.rs index b3692f481..c501b0bab 100644 --- a/src/uu/df/src/df.rs +++ b/src/uu/df/src/df.rs @@ -240,7 +240,7 @@ impl Options { } } - (!intersected_types.is_empty()).then(|| intersected_types) + (!intersected_types.is_empty()).then_some(intersected_types) } } diff --git a/src/uu/dir/Cargo.toml b/src/uu/dir/Cargo.toml index 09746b94c..03235fdfc 100644 --- a/src/uu/dir/Cargo.toml +++ b/src/uu/dir/Cargo.toml @@ -15,9 +15,9 @@ edition = "2021" path = "src/dir.rs" [dependencies] -clap = { version = "4.0", features = ["wrap_help", "cargo", "env"] } -uucore = { version=">=0.0.17", package="uucore", path="../../uucore", features=["entries", "fs"] } -uu_ls = { version = ">=0.0.17", path="../ls"} +clap = { workspace=true, features = ["env"] } +uucore = { workspace=true, features=["entries", "fs"] } +uu_ls = { workspace=true } [[bin]] name = "dir" diff --git a/src/uu/dircolors/Cargo.toml b/src/uu/dircolors/Cargo.toml index 434b22d3a..9a3479426 100644 --- a/src/uu/dircolors/Cargo.toml +++ b/src/uu/dircolors/Cargo.toml @@ -15,8 +15,8 @@ edition = "2021" path = "src/dircolors.rs" [dependencies] -clap = { version = "4.0", features = ["wrap_help", "cargo"] } -uucore = { version=">=0.0.17", package="uucore", path="../../uucore" } +clap = { workspace=true } +uucore = { workspace=true } [[bin]] name = "dircolors" diff --git a/src/uu/dirname/Cargo.toml b/src/uu/dirname/Cargo.toml index 9a23d50b9..1186a4697 100644 --- a/src/uu/dirname/Cargo.toml +++ b/src/uu/dirname/Cargo.toml @@ -15,8 +15,8 @@ edition = "2021" path = "src/dirname.rs" [dependencies] -clap = { version = "4.0", features = ["wrap_help", "cargo"] } -uucore = { version=">=0.0.17", package="uucore", path="../../uucore" } +clap = { workspace=true } +uucore = { workspace=true } [[bin]] name = "dirname" diff --git a/src/uu/dirname/src/dirname.rs b/src/uu/dirname/src/dirname.rs index 99495f88d..b53f6135a 100644 --- a/src/uu/dirname/src/dirname.rs +++ b/src/uu/dirname/src/dirname.rs @@ -11,7 +11,7 @@ use uucore::display::print_verbatim; use uucore::error::{UResult, UUsageError}; use uucore::format_usage; -static ABOUT: &str = "strip last component from file name"; +static ABOUT: &str = "Strip last component from file name"; const USAGE: &str = "{} [OPTION] NAME..."; mod options { diff --git a/src/uu/du/Cargo.toml b/src/uu/du/Cargo.toml index 57855b886..a8e8aead5 100644 --- a/src/uu/du/Cargo.toml +++ b/src/uu/du/Cargo.toml @@ -15,14 +15,14 @@ edition = "2021" path = "src/du.rs" [dependencies] -chrono = { version="^0.4.23", default-features=false, features=["std", "alloc", "clock"]} +chrono = { workspace=true } # For the --exclude & --exclude-from options -glob = "0.3.0" -clap = { version = "4.0", features = ["wrap_help", "cargo"] } -uucore = { version=">=0.0.17", package="uucore", path="../../uucore" } +glob = { workspace=true } +clap = { workspace=true } +uucore = { workspace=true } [target.'cfg(target_os = "windows")'.dependencies] -windows-sys = { version = "0.42.0", default-features = false, features = ["Win32_Storage_FileSystem", "Win32_Foundation"] } +windows-sys = { workspace=true, features = ["Win32_Storage_FileSystem", "Win32_Foundation"] } [[bin]] name = "du" diff --git a/src/uu/du/src/du.rs b/src/uu/du/src/du.rs index 9d1bb776f..a204adf4d 100644 --- a/src/uu/du/src/du.rs +++ b/src/uu/du/src/du.rs @@ -73,7 +73,7 @@ mod options { pub const FILE: &str = "FILE"; } -const ABOUT: &str = "estimate file space usage"; +const ABOUT: &str = "Estimate file space usage"; const LONG_HELP: &str = " Display values are in units of the first available SIZE from --block-size, and the DU_BLOCK_SIZE, BLOCK_SIZE and BLOCKSIZE environment variables. diff --git a/src/uu/echo/Cargo.toml b/src/uu/echo/Cargo.toml index a241c1427..0ae385cbe 100644 --- a/src/uu/echo/Cargo.toml +++ b/src/uu/echo/Cargo.toml @@ -15,8 +15,8 @@ edition = "2021" path = "src/echo.rs" [dependencies] -clap = { version = "4.0", features = ["wrap_help", "cargo"] } -uucore = { version=">=0.0.17", package="uucore", path="../../uucore" } +clap = { workspace=true } +uucore = { workspace=true } [[bin]] name = "echo" diff --git a/src/uu/echo/src/echo.rs b/src/uu/echo/src/echo.rs index e6608682b..6c6959aff 100644 --- a/src/uu/echo/src/echo.rs +++ b/src/uu/echo/src/echo.rs @@ -13,7 +13,7 @@ use std::str::Chars; use uucore::error::{FromIo, UResult}; use uucore::format_usage; -const ABOUT: &str = "display a line of text"; +const ABOUT: &str = "Display a line of text"; const USAGE: &str = "{} [OPTIONS]... [STRING]..."; const AFTER_HELP: &str = r#" Echo the STRING(s) to standard output. diff --git a/src/uu/env/Cargo.toml b/src/uu/env/Cargo.toml index 311d34c06..b2224c405 100644 --- a/src/uu/env/Cargo.toml +++ b/src/uu/env/Cargo.toml @@ -15,12 +15,12 @@ edition = "2021" path = "src/env.rs" [dependencies] -clap = { version = "4.0", features = ["wrap_help", "cargo"] } -rust-ini = "0.18.0" -uucore = { version=">=0.0.17", package="uucore", path="../../uucore", features=["signals"]} +clap = { workspace=true } +rust-ini = { workspace=true } +uucore = { workspace=true, features=["signals"]} [target.'cfg(unix)'.dependencies] -nix = { version = "0.25", default-features = false, features = ["signal"] } +nix = { workspace=true, features = ["signal"] } [[bin]] diff --git a/src/uu/env/src/env.rs b/src/uu/env/src/env.rs index a38e04348..b3fa871d3 100644 --- a/src/uu/env/src/env.rs +++ b/src/uu/env/src/env.rs @@ -25,7 +25,7 @@ use uucore::display::Quotable; use uucore::error::{UClapError, UResult, USimpleError, UUsageError}; use uucore::{format_usage, show_warning}; -const ABOUT: &str = "set each NAME to VALUE in the environment and run COMMAND"; +const ABOUT: &str = "Set each NAME to VALUE in the environment and run COMMAND"; const USAGE: &str = "{} [OPTION]... [-] [NAME=VALUE]... [COMMAND [ARG]...]"; const AFTER_HELP: &str = "\ A mere - implies -i. If no COMMAND, print the resulting environment. diff --git a/src/uu/expand/Cargo.toml b/src/uu/expand/Cargo.toml index cac1f173f..362ed5a3a 100644 --- a/src/uu/expand/Cargo.toml +++ b/src/uu/expand/Cargo.toml @@ -15,9 +15,9 @@ edition = "2021" path = "src/expand.rs" [dependencies] -clap = { version = "4.0", features = ["wrap_help", "cargo"] } -unicode-width = "0.1.5" -uucore = { version=">=0.0.17", package="uucore", path="../../uucore" } +clap = { workspace=true } +unicode-width = { workspace=true } +uucore = { workspace=true } [[bin]] name = "expand" diff --git a/src/uu/expr/Cargo.toml b/src/uu/expr/Cargo.toml index 18de38a7c..4ee2b5b1a 100644 --- a/src/uu/expr/Cargo.toml +++ b/src/uu/expr/Cargo.toml @@ -15,11 +15,11 @@ edition = "2021" path = "src/expr.rs" [dependencies] -clap = { version = "4.0", features = ["wrap_help", "cargo"] } -num-bigint = "0.4.0" -num-traits = "0.2.15" -onig = { version = "~6.4", default-features = false } -uucore = { version=">=0.0.17", package="uucore", path="../../uucore" } +clap = { workspace=true } +num-bigint = { workspace=true } +num-traits = { workspace=true } +onig = { workspace=true } +uucore = { workspace=true } [[bin]] name = "expr" diff --git a/src/uu/factor/Cargo.toml b/src/uu/factor/Cargo.toml index 06175a515..73be80738 100644 --- a/src/uu/factor/Cargo.toml +++ b/src/uu/factor/Cargo.toml @@ -12,15 +12,15 @@ categories = ["command-line-utilities"] edition = "2021" [build-dependencies] -num-traits = "0.2.15" # used in src/numerics.rs, which is included by build.rs +num-traits = { workspace=true } # used in src/numerics.rs, which is included by build.rs [dependencies] -clap = { version = "4.0", features = ["wrap_help", "cargo"] } -coz = { version = "0.1.3", optional = true } -num-traits = "0.2.15" # Needs at least version 0.2.15 for "OverflowingAdd" -rand = { version = "0.8", features = ["small_rng"] } -smallvec = { version = "1.10", features = ["union"] } -uucore = { version=">=0.0.17", package="uucore", path="../../uucore" } +clap = { workspace=true } +coz = { workspace=true, optional = true } +num-traits = { workspace=true } +rand = { workspace=true } +smallvec = { workspace=true } +uucore = { workspace=true } [dev-dependencies] paste = "1.0.6" diff --git a/src/uu/false/Cargo.toml b/src/uu/false/Cargo.toml index 848d872aa..1bd0bc260 100644 --- a/src/uu/false/Cargo.toml +++ b/src/uu/false/Cargo.toml @@ -15,8 +15,8 @@ edition = "2021" path = "src/false.rs" [dependencies] -clap = { version = "4.0", features = ["wrap_help", "cargo"] } -uucore = { version=">=0.0.17", package="uucore", path="../../uucore" } +clap = { workspace=true } +uucore = { workspace=true } [[bin]] name = "false" diff --git a/src/uu/fmt/Cargo.toml b/src/uu/fmt/Cargo.toml index 5f6449508..f37e9468a 100644 --- a/src/uu/fmt/Cargo.toml +++ b/src/uu/fmt/Cargo.toml @@ -15,9 +15,9 @@ edition = "2021" path = "src/fmt.rs" [dependencies] -clap = { version = "4.0", features = ["wrap_help", "cargo"] } -unicode-width = "0.1.5" -uucore = { version=">=0.0.17", package="uucore", path="../../uucore" } +clap = { workspace=true } +unicode-width = { workspace=true } +uucore = { workspace=true } [[bin]] name = "fmt" diff --git a/src/uu/fold/Cargo.toml b/src/uu/fold/Cargo.toml index 44fe202f9..d3e4417e1 100644 --- a/src/uu/fold/Cargo.toml +++ b/src/uu/fold/Cargo.toml @@ -15,8 +15,8 @@ edition = "2021" path = "src/fold.rs" [dependencies] -clap = { version = "4.0", features = ["wrap_help", "cargo"] } -uucore = { version=">=0.0.17", package="uucore", path="../../uucore" } +clap = { workspace=true } +uucore = { workspace=true } [[bin]] name = "fold" diff --git a/src/uu/groups/Cargo.toml b/src/uu/groups/Cargo.toml index 3dec2ca9a..49034a4b3 100644 --- a/src/uu/groups/Cargo.toml +++ b/src/uu/groups/Cargo.toml @@ -15,8 +15,8 @@ edition = "2021" path = "src/groups.rs" [dependencies] -clap = { version = "4.0", features = ["wrap_help", "cargo"] } -uucore = { version=">=0.0.17", package="uucore", path="../../uucore", features=["entries", "process"] } +clap = { workspace=true } +uucore = { workspace=true, features=["entries", "process"] } [[bin]] name = "groups" diff --git a/src/uu/hashsum/Cargo.toml b/src/uu/hashsum/Cargo.toml index d4cd82102..b037cbcb8 100644 --- a/src/uu/hashsum/Cargo.toml +++ b/src/uu/hashsum/Cargo.toml @@ -16,17 +16,17 @@ path = "src/hashsum.rs" [dependencies] digest = "0.10.6" -clap = { version = "4.0", features = ["wrap_help", "cargo"] } +clap = { workspace=true } hex = "0.4.3" -memchr = "2" +memchr = { workspace=true } md-5 = "0.10.5" -regex = "1.7.1" +regex = { workspace=true } sha1 = "0.10.1" sha2 = "0.10.2" sha3 = "0.10.6" -blake2b_simd = "1.0.0" +blake2b_simd = "1.0.1" blake3 = "1.3.2" -uucore = { version=">=0.0.17", package="uucore", path="../../uucore" } +uucore = { workspace=true } [[bin]] name = "hashsum" diff --git a/src/uu/head/Cargo.toml b/src/uu/head/Cargo.toml index 3a4dd42f2..c631cf331 100644 --- a/src/uu/head/Cargo.toml +++ b/src/uu/head/Cargo.toml @@ -15,9 +15,9 @@ edition = "2021" path = "src/head.rs" [dependencies] -clap = { version = "4.0", features = ["wrap_help", "cargo"] } -memchr = "2" -uucore = { version=">=0.0.17", package="uucore", path="../../uucore", features=["ringbuffer", "lines"] } +clap = { workspace=true } +memchr = { workspace=true } +uucore = { workspace=true, features=["ringbuffer", "lines"] } [[bin]] name = "head" diff --git a/src/uu/hostid/Cargo.toml b/src/uu/hostid/Cargo.toml index 348e35723..7aa28328a 100644 --- a/src/uu/hostid/Cargo.toml +++ b/src/uu/hostid/Cargo.toml @@ -15,9 +15,9 @@ edition = "2021" path = "src/hostid.rs" [dependencies] -clap = { version = "4.0", features = ["wrap_help", "cargo"] } -libc = "0.2.137" -uucore = { version=">=0.0.17", package="uucore", path="../../uucore" } +clap = { workspace=true } +libc = { workspace=true } +uucore = { workspace=true } [[bin]] name = "hostid" diff --git a/src/uu/hostname/Cargo.toml b/src/uu/hostname/Cargo.toml index e4df40263..e57e5c364 100644 --- a/src/uu/hostname/Cargo.toml +++ b/src/uu/hostname/Cargo.toml @@ -15,12 +15,12 @@ edition = "2021" path = "src/hostname.rs" [dependencies] -clap = { version = "4.0", features = ["wrap_help", "cargo"] } +clap = { workspace=true } hostname = { version = "0.3", features = ["set"] } -uucore = { version=">=0.0.17", package="uucore", path="../../uucore", features=["wide"] } +uucore = { workspace=true, features=["wide"] } [target.'cfg(target_os = "windows")'.dependencies] -windows-sys = { version = "0.42.0", default-features = false, features = ["Win32_Networking_WinSock", "Win32_Foundation"] } +windows-sys = { workspace=true, features = ["Win32_Networking_WinSock", "Win32_Foundation"] } [[bin]] name = "hostname" diff --git a/src/uu/id/Cargo.toml b/src/uu/id/Cargo.toml index 4437b4898..3a157ada4 100644 --- a/src/uu/id/Cargo.toml +++ b/src/uu/id/Cargo.toml @@ -15,9 +15,9 @@ edition = "2021" path = "src/id.rs" [dependencies] -clap = { version = "4.0", features = ["wrap_help", "cargo"] } -uucore = { version=">=0.0.17", package="uucore", path="../../uucore", features=["entries", "process"] } -selinux = { version="0.3", optional = true } +clap = { workspace=true } +uucore = { workspace=true, features=["entries", "process"] } +selinux = { workspace=true, optional=true } [[bin]] name = "id" diff --git a/src/uu/install/Cargo.toml b/src/uu/install/Cargo.toml index b51f2bbd2..0890fe8c9 100644 --- a/src/uu/install/Cargo.toml +++ b/src/uu/install/Cargo.toml @@ -18,14 +18,14 @@ edition = "2021" path = "src/install.rs" [dependencies] -clap = { version = "4.0", features = ["wrap_help", "cargo"] } -filetime = "0.2" -file_diff = "1.0.0" -libc = ">= 0.2" -uucore = { version=">=0.0.17", package="uucore", path="../../uucore", features=["fs", "mode", "perms", "entries"] } +clap = { workspace=true } +filetime = { workspace=true } +file_diff = { workspace=true } +libc = { workspace=true } +uucore = { workspace=true, features=["fs", "mode", "perms", "entries"] } [dev-dependencies] -time = "0.3" +time = { workspace=true } [[bin]] name = "install" diff --git a/src/uu/join/Cargo.toml b/src/uu/join/Cargo.toml index 3b8231185..5be4af1a7 100644 --- a/src/uu/join/Cargo.toml +++ b/src/uu/join/Cargo.toml @@ -15,9 +15,9 @@ edition = "2021" path = "src/join.rs" [dependencies] -clap = { version = "4.0", features = ["wrap_help", "cargo"] } -uucore = { version=">=0.0.17", package="uucore", path="../../uucore" } -memchr = "2" +clap = { workspace=true } +uucore = { workspace=true } +memchr = { workspace=true } [[bin]] name = "join" diff --git a/src/uu/kill/Cargo.toml b/src/uu/kill/Cargo.toml index 21431e3fe..817190083 100644 --- a/src/uu/kill/Cargo.toml +++ b/src/uu/kill/Cargo.toml @@ -15,9 +15,9 @@ edition = "2021" path = "src/kill.rs" [dependencies] -clap = { version = "4.0", features = ["wrap_help", "cargo"] } -nix = { version = "0.25", features = ["signal"] } -uucore = { version=">=0.0.17", package="uucore", path="../../uucore", features=["signals"] } +clap = { workspace=true } +nix = { workspace=true, features = ["signal"] } +uucore = { workspace=true, features=["signals"] } [[bin]] name = "kill" diff --git a/src/uu/link/Cargo.toml b/src/uu/link/Cargo.toml index 5a8984f1f..e35e23cfc 100644 --- a/src/uu/link/Cargo.toml +++ b/src/uu/link/Cargo.toml @@ -15,8 +15,8 @@ edition = "2021" path = "src/link.rs" [dependencies] -clap = { version = "4.0", features = ["wrap_help", "cargo"] } -uucore = { version=">=0.0.17", package="uucore", path="../../uucore" } +clap = { workspace=true } +uucore = { workspace=true } [[bin]] name = "link" diff --git a/src/uu/ln/Cargo.toml b/src/uu/ln/Cargo.toml index 2f07c8c4d..f08f04e41 100644 --- a/src/uu/ln/Cargo.toml +++ b/src/uu/ln/Cargo.toml @@ -15,8 +15,8 @@ edition = "2021" path = "src/ln.rs" [dependencies] -clap = { version = "4.0", features = ["wrap_help", "cargo"] } -uucore = { version=">=0.0.17", package="uucore", path="../../uucore", features=["fs"] } +clap = { workspace=true } +uucore = { workspace=true, features=["fs"] } [[bin]] name = "ln" diff --git a/src/uu/ln/src/ln.rs b/src/uu/ln/src/ln.rs index 55bc34f8a..dac7fd556 100644 --- a/src/uu/ln/src/ln.rs +++ b/src/uu/ln/src/ln.rs @@ -85,26 +85,21 @@ impl UError for LnError { } } -fn long_usage() -> String { - String::from( - " In the 1st form, create a link to TARGET with the name LINK_NAME. - In the 2nd form, create a link to TARGET in the current directory. - In the 3rd and 4th forms, create links to each TARGET in DIRECTORY. - Create hard links by default, symbolic links with --symbolic. - By default, each destination (name of new link) should not already exist. - When creating hard links, each TARGET must exist. Symbolic links - can hold arbitrary text; if later resolved, a relative link is - interpreted in relation to its parent directory. - ", - ) -} - -static ABOUT: &str = "change file owner and group"; +const ABOUT: &str = "Change file owner and group"; const USAGE: &str = "\ - {} [OPTION]... [-T] TARGET LINK_NAME - {} [OPTION]... TARGET - {} [OPTION]... TARGET... DIRECTORY - {} [OPTION]... -t DIRECTORY TARGET..."; + {} [OPTION]... [-T] TARGET LINK_NAME + {} [OPTION]... TARGET + {} [OPTION]... TARGET... DIRECTORY + {} [OPTION]... -t DIRECTORY TARGET..."; +const LONG_USAGE: &str = "\ + In the 1st form, create a link to TARGET with the name LINK_NAME.\n\ + In the 2nd form, create a link to TARGET in the current directory.\n\ + In the 3rd and 4th forms, create links to each TARGET in DIRECTORY.\n\ + Create hard links by default, symbolic links with --symbolic.\n\ + By default, each destination (name of new link) should not already exist.\n\ + When creating hard links, each TARGET must exist. Symbolic links\n\ + can hold arbitrary text; if later resolved, a relative link is\n\ + interpreted in relation to its parent directory."; mod options { pub const FORCE: &str = "force"; @@ -124,10 +119,9 @@ static ARG_FILES: &str = "files"; #[uucore::main] pub fn uumain(args: impl uucore::Args) -> UResult<()> { - // clap requires a 'static string let long_usage = format!( - "{}\n{}", - long_usage(), + "{}\n\n{}", + LONG_USAGE, backup_control::BACKUP_CONTROL_LONG_HELP ); diff --git a/src/uu/logname/Cargo.toml b/src/uu/logname/Cargo.toml index a75e5efa7..18ecdc9ab 100644 --- a/src/uu/logname/Cargo.toml +++ b/src/uu/logname/Cargo.toml @@ -15,9 +15,9 @@ edition = "2021" path = "src/logname.rs" [dependencies] -libc = "0.2.137" -clap = { version = "4.0", features = ["wrap_help", "cargo"] } -uucore = { version=">=0.0.17", package="uucore", path="../../uucore" } +libc = { workspace=true } +clap = { workspace=true } +uucore = { workspace=true } [[bin]] name = "logname" diff --git a/src/uu/ls/Cargo.toml b/src/uu/ls/Cargo.toml index c68c6b5ae..ade9c5e29 100644 --- a/src/uu/ls/Cargo.toml +++ b/src/uu/ls/Cargo.toml @@ -15,18 +15,18 @@ edition = "2021" path = "src/ls.rs" [dependencies] -chrono = { version="^0.4.23", default-features=false, features=["std", "alloc", "clock"]} -clap = { version = "4.0", features = ["wrap_help", "cargo", "env"] } -unicode-width = "0.1.8" -number_prefix = "0.4" -term_grid = "0.1.5" -terminal_size = "0.2.2" -glob = "0.3.0" -lscolors = { version = "0.13.0", default-features=false, features = ["nu-ansi-term"] } -uucore = { version=">=0.0.17", package="uucore", path="../../uucore", features = ["entries", "fs"] } -once_cell = "1.13.1" -atty = "0.2" -selinux = { version="0.3", optional = true } +clap = { workspace=true, features = ["env"] } +chrono = { workspace=true } +unicode-width = { workspace=true } +number_prefix = { workspace=true } +term_grid = { workspace=true } +terminal_size = { workspace=true } +glob = { workspace=true } +lscolors = { workspace=true } +uucore = { workspace=true, features = ["entries", "fs"] } +once_cell = { workspace=true } +atty = { workspace=true } +selinux = { workspace=true, optional = true } [[bin]] name = "ls" diff --git a/src/uu/mkdir/Cargo.toml b/src/uu/mkdir/Cargo.toml index 93aaea73f..b8bc1dddf 100644 --- a/src/uu/mkdir/Cargo.toml +++ b/src/uu/mkdir/Cargo.toml @@ -15,8 +15,8 @@ edition = "2021" path = "src/mkdir.rs" [dependencies] -clap = { version = "4.0", features = ["wrap_help", "cargo"] } -uucore = { version=">=0.0.17", package="uucore", path="../../uucore", features=["fs", "mode"] } +clap = { workspace=true } +uucore = { workspace=true, features=["fs", "mode"] } [[bin]] name = "mkdir" diff --git a/src/uu/mkfifo/Cargo.toml b/src/uu/mkfifo/Cargo.toml index 0fc9cad74..9ffe3c765 100644 --- a/src/uu/mkfifo/Cargo.toml +++ b/src/uu/mkfifo/Cargo.toml @@ -15,9 +15,9 @@ edition = "2021" path = "src/mkfifo.rs" [dependencies] -clap = { version = "4.0", features = ["wrap_help", "cargo"] } -libc = "0.2.137" -uucore = { version=">=0.0.17", package="uucore", path="../../uucore" } +clap = { workspace=true } +libc = { workspace=true } +uucore = { workspace=true } [[bin]] name = "mkfifo" diff --git a/src/uu/mknod/Cargo.toml b/src/uu/mknod/Cargo.toml index 8fbcc0777..b74ed3b46 100644 --- a/src/uu/mknod/Cargo.toml +++ b/src/uu/mknod/Cargo.toml @@ -16,9 +16,9 @@ name = "uu_mknod" path = "src/mknod.rs" [dependencies] -clap = { version = "4.0", features = ["wrap_help", "cargo"] } -libc = "^0.2.137" -uucore = { version=">=0.0.17", package="uucore", path="../../uucore", features=["mode"] } +clap = { workspace=true } +libc = { workspace=true } +uucore = { workspace=true, features=["mode"] } [[bin]] name = "mknod" diff --git a/src/uu/mktemp/Cargo.toml b/src/uu/mktemp/Cargo.toml index d00fb4c05..029e89bc9 100644 --- a/src/uu/mktemp/Cargo.toml +++ b/src/uu/mktemp/Cargo.toml @@ -15,10 +15,10 @@ edition = "2021" path = "src/mktemp.rs" [dependencies] -clap = { version = "4.0", features = ["wrap_help", "cargo"] } -rand = "0.8" -tempfile = "3" -uucore = { version=">=0.0.17", package="uucore", path="../../uucore" } +clap = { workspace=true } +rand = { workspace=true } +tempfile = { workspace=true } +uucore = { workspace=true } [[bin]] name = "mktemp" diff --git a/src/uu/mktemp/src/mktemp.rs b/src/uu/mktemp/src/mktemp.rs index d8056ffce..390c77bfa 100644 --- a/src/uu/mktemp/src/mktemp.rs +++ b/src/uu/mktemp/src/mktemp.rs @@ -28,7 +28,7 @@ use std::os::unix::prelude::PermissionsExt; use rand::Rng; use tempfile::Builder; -static ABOUT: &str = "create a temporary file or directory."; +static ABOUT: &str = "Create a temporary file or directory."; const USAGE: &str = "{} [OPTION]... [TEMPLATE]"; static DEFAULT_TEMPLATE: &str = "tmp.XXXXXXXXXX"; diff --git a/src/uu/more/Cargo.toml b/src/uu/more/Cargo.toml index b52ed1880..416a2359b 100644 --- a/src/uu/more/Cargo.toml +++ b/src/uu/more/Cargo.toml @@ -15,15 +15,15 @@ edition = "2021" path = "src/more.rs" [dependencies] -clap = { version = "4.0", features = ["wrap_help", "cargo"] } -uucore = { version=">=0.0.17", package="uucore", path="../../uucore" } -crossterm = ">=0.19" -atty = "0.2" -unicode-width = "0.1.7" -unicode-segmentation = "1.9.0" +clap = { workspace=true } +uucore = { workspace=true } +crossterm = { workspace=true } +atty = { workspace=true } +unicode-width = { workspace=true } +unicode-segmentation = { workspace=true } [target.'cfg(all(unix, not(target_os = "fuchsia")))'.dependencies] -nix = { version = "0.25", default-features = false } +nix = { workspace=true } [[bin]] name = "more" diff --git a/src/uu/mv/Cargo.toml b/src/uu/mv/Cargo.toml index 2b4272fea..87ce36c5f 100644 --- a/src/uu/mv/Cargo.toml +++ b/src/uu/mv/Cargo.toml @@ -15,11 +15,10 @@ edition = "2021" path = "src/mv.rs" [dependencies] -clap = { version = "4.0", features = ["wrap_help", "cargo"] } -fs_extra = "1.3.0" -indicatif = "0.17" - -uucore = { version=">=0.0.17", package="uucore", path="../../uucore" } +clap = { workspace=true } +fs_extra = { workspace=true } +indicatif = { workspace=true } +uucore = { workspace=true } [[bin]] name = "mv" diff --git a/src/uu/nice/Cargo.toml b/src/uu/nice/Cargo.toml index b3f013bde..054daf273 100644 --- a/src/uu/nice/Cargo.toml +++ b/src/uu/nice/Cargo.toml @@ -15,10 +15,10 @@ edition = "2021" path = "src/nice.rs" [dependencies] -clap = { version = "4.0", features = ["wrap_help", "cargo"] } -libc = "0.2.137" -nix = { version = "0.25", default-features = false } -uucore = { version=">=0.0.17", package="uucore", path="../../uucore" } +clap = { workspace=true } +libc = { workspace=true } +nix = { workspace=true } +uucore = { workspace=true } [[bin]] name = "nice" diff --git a/src/uu/nl/Cargo.toml b/src/uu/nl/Cargo.toml index aa1ae9b06..5dd539db8 100644 --- a/src/uu/nl/Cargo.toml +++ b/src/uu/nl/Cargo.toml @@ -15,9 +15,9 @@ edition = "2021" path = "src/nl.rs" [dependencies] -clap = { version = "4.0", features = ["wrap_help", "cargo"] } -regex = "1.7.1" -uucore = { version=">=0.0.17", package="uucore", path="../../uucore" } +clap = { workspace=true } +regex = { workspace=true } +uucore = { workspace=true } [[bin]] name = "nl" diff --git a/src/uu/nl/src/nl.rs b/src/uu/nl/src/nl.rs index 6243bef8d..54d0cfea9 100644 --- a/src/uu/nl/src/nl.rs +++ b/src/uu/nl/src/nl.rs @@ -18,7 +18,7 @@ use uucore::format_usage; mod helper; -static ABOUT: &str = "number lines of files"; +static ABOUT: &str = "Number lines of files"; static USAGE: &str = "{} [OPTION]... [FILE]..."; // Settings store options used by nl to produce its output. diff --git a/src/uu/nohup/Cargo.toml b/src/uu/nohup/Cargo.toml index 4ad495245..9a6b4af43 100644 --- a/src/uu/nohup/Cargo.toml +++ b/src/uu/nohup/Cargo.toml @@ -15,10 +15,10 @@ edition = "2021" path = "src/nohup.rs" [dependencies] -clap = { version = "4.0", features = ["wrap_help", "cargo"] } -libc = "0.2.137" -atty = "0.2" -uucore = { version=">=0.0.17", package="uucore", path="../../uucore", features=["fs"] } +clap = { workspace=true } +libc = { workspace=true } +atty = { workspace=true } +uucore = { workspace=true, features=["fs"] } [[bin]] name = "nohup" diff --git a/src/uu/nproc/Cargo.toml b/src/uu/nproc/Cargo.toml index c720990b4..dc51d8a55 100644 --- a/src/uu/nproc/Cargo.toml +++ b/src/uu/nproc/Cargo.toml @@ -15,10 +15,10 @@ edition = "2021" path = "src/nproc.rs" [dependencies] -libc = "0.2.137" -num_cpus = "1.14" -clap = { version = "4.0", features = ["wrap_help", "cargo"] } -uucore = { version=">=0.0.17", package="uucore", path="../../uucore", features=["fs"] } +libc = { workspace=true } +num_cpus = { workspace=true } +clap = { workspace=true } +uucore = { workspace=true, features=["fs"] } [[bin]] name = "nproc" diff --git a/src/uu/numfmt/Cargo.toml b/src/uu/numfmt/Cargo.toml index c6358bd6f..2e68cbab2 100644 --- a/src/uu/numfmt/Cargo.toml +++ b/src/uu/numfmt/Cargo.toml @@ -15,8 +15,8 @@ edition = "2021" path = "src/numfmt.rs" [dependencies] -clap = { version = "4.0", features = ["wrap_help", "cargo"] } -uucore = { version=">=0.0.17", package="uucore", path="../../uucore" } +clap = { workspace=true } +uucore = { workspace=true } [[bin]] name = "numfmt" diff --git a/src/uu/od/Cargo.toml b/src/uu/od/Cargo.toml index 827436354..c2bc93731 100644 --- a/src/uu/od/Cargo.toml +++ b/src/uu/od/Cargo.toml @@ -15,10 +15,10 @@ edition = "2021" path = "src/od.rs" [dependencies] -byteorder = "1.3.2" -clap = { version = "4.0", features = ["wrap_help", "cargo"] } -half = "2.1" -uucore = { version=">=0.0.17", package="uucore", path="../../uucore" } +byteorder = { workspace=true } +clap = { workspace=true } +half = { workspace=true } +uucore = { workspace=true } [[bin]] name = "od" diff --git a/src/uu/od/src/od.rs b/src/uu/od/src/od.rs index 77480cb38..ebcaa50ba 100644 --- a/src/uu/od/src/od.rs +++ b/src/uu/od/src/od.rs @@ -50,7 +50,7 @@ use uucore::show_error; use uucore::show_warning; const PEEK_BUFFER_SIZE: usize = 4; // utf-8 can be 4 bytes -static ABOUT: &str = "dump files in octal and other formats"; +static ABOUT: &str = "Dump files in octal and other formats"; static USAGE: &str = "\ {} [OPTION]... [--] [FILENAME]... diff --git a/src/uu/paste/Cargo.toml b/src/uu/paste/Cargo.toml index 4012f14ff..aa1f5fe90 100644 --- a/src/uu/paste/Cargo.toml +++ b/src/uu/paste/Cargo.toml @@ -15,8 +15,8 @@ edition = "2021" path = "src/paste.rs" [dependencies] -clap = { version = "4.0", features = ["wrap_help", "cargo"] } -uucore = { version=">=0.0.17", package="uucore", path="../../uucore" } +clap = { workspace=true } +uucore = { workspace=true } [[bin]] name = "paste" diff --git a/src/uu/pathchk/Cargo.toml b/src/uu/pathchk/Cargo.toml index f8a203a3f..134f5bb5d 100644 --- a/src/uu/pathchk/Cargo.toml +++ b/src/uu/pathchk/Cargo.toml @@ -15,9 +15,9 @@ edition = "2021" path = "src/pathchk.rs" [dependencies] -clap = { version = "4.0", features = ["wrap_help", "cargo"] } -libc = "0.2.137" -uucore = { version=">=0.0.17", package="uucore", path="../../uucore" } +clap = { workspace=true } +libc = { workspace=true } +uucore = { workspace=true } [[bin]] name = "pathchk" diff --git a/src/uu/pinky/Cargo.toml b/src/uu/pinky/Cargo.toml index 136ab48fc..a9abee40b 100644 --- a/src/uu/pinky/Cargo.toml +++ b/src/uu/pinky/Cargo.toml @@ -15,8 +15,8 @@ edition = "2021" path = "src/pinky.rs" [dependencies] -clap = { version = "4.0", features = ["wrap_help", "cargo"] } -uucore = { version=">=0.0.17", package="uucore", path="../../uucore", features=["utmpx", "entries"] } +clap = { workspace=true } +uucore = { workspace=true, features=["utmpx", "entries"] } [[bin]] name = "pinky" diff --git a/src/uu/pinky/src/pinky.rs b/src/uu/pinky/src/pinky.rs index 8060565e4..7e21fba9e 100644 --- a/src/uu/pinky/src/pinky.rs +++ b/src/uu/pinky/src/pinky.rs @@ -22,7 +22,7 @@ use clap::{crate_version, Arg, ArgAction, Command}; use std::path::PathBuf; use uucore::format_usage; -static ABOUT: &str = "lightweight finger"; +static ABOUT: &str = "Lightweight finger"; const USAGE: &str = "{} [OPTION]... [USER]..."; mod options { diff --git a/src/uu/pr/Cargo.toml b/src/uu/pr/Cargo.toml index 310ce07a2..773a71b7f 100644 --- a/src/uu/pr/Cargo.toml +++ b/src/uu/pr/Cargo.toml @@ -15,12 +15,12 @@ edition = "2021" path = "src/pr.rs" [dependencies] -clap = { version = "4.0", features = ["wrap_help", "cargo"] } -time = { version = "0.3", features = ["local-offset", "macros", "formatting"] } -uucore = { version=">=0.0.17", package="uucore", path="../../uucore", features=["entries"] } -quick-error = "2.0.1" -itertools = "0.10.0" -regex = "1.7" +clap = { workspace=true } +time = { workspace=true, features = ["local-offset", "macros", "formatting"] } +uucore = { workspace=true, features=["entries"] } +quick-error = { workspace=true } +itertools = { workspace=true } +regex = { workspace=true } [[bin]] name = "pr" diff --git a/src/uu/printenv/Cargo.toml b/src/uu/printenv/Cargo.toml index b81c3906d..7f179e411 100644 --- a/src/uu/printenv/Cargo.toml +++ b/src/uu/printenv/Cargo.toml @@ -15,8 +15,8 @@ edition = "2021" path = "src/printenv.rs" [dependencies] -clap = { version = "4.0", features = ["wrap_help", "cargo"] } -uucore = { version=">=0.0.17", package="uucore", path="../../uucore" } +clap = { workspace=true } +uucore = { workspace=true } [[bin]] name = "printenv" diff --git a/src/uu/printf/Cargo.toml b/src/uu/printf/Cargo.toml index 548641b76..ffb266f18 100644 --- a/src/uu/printf/Cargo.toml +++ b/src/uu/printf/Cargo.toml @@ -18,8 +18,8 @@ edition = "2021" path = "src/printf.rs" [dependencies] -clap = { version = "4.0", features = ["wrap_help", "cargo"] } -uucore = { version=">=0.0.17", package="uucore", path="../../uucore", features=["memo"] } +clap = { workspace=true } +uucore = { workspace=true, features=["memo"] } [[bin]] name = "printf" diff --git a/src/uu/ptx/Cargo.toml b/src/uu/ptx/Cargo.toml index f7bfa152a..1cb2857d3 100644 --- a/src/uu/ptx/Cargo.toml +++ b/src/uu/ptx/Cargo.toml @@ -15,9 +15,9 @@ edition = "2021" path = "src/ptx.rs" [dependencies] -clap = { version = "4.0", features = ["wrap_help", "cargo"] } -regex = "1.7.1" -uucore = { version=">=0.0.17", package="uucore", path="../../uucore" } +clap = { workspace=true } +regex = { workspace=true } +uucore = { workspace=true } [[bin]] name = "ptx" diff --git a/src/uu/pwd/Cargo.toml b/src/uu/pwd/Cargo.toml index 1886ddeac..2be204608 100644 --- a/src/uu/pwd/Cargo.toml +++ b/src/uu/pwd/Cargo.toml @@ -15,8 +15,8 @@ edition = "2021" path = "src/pwd.rs" [dependencies] -clap = { version = "4.0", features = ["wrap_help", "cargo"] } -uucore = { version=">=0.0.17", package="uucore", path="../../uucore" } +clap = { workspace=true } +uucore = { workspace=true } [[bin]] name = "pwd" diff --git a/src/uu/readlink/Cargo.toml b/src/uu/readlink/Cargo.toml index a7a28b1d6..59acd7731 100644 --- a/src/uu/readlink/Cargo.toml +++ b/src/uu/readlink/Cargo.toml @@ -15,8 +15,8 @@ edition = "2021" path = "src/readlink.rs" [dependencies] -clap = { version = "4.0", features = ["wrap_help", "cargo"] } -uucore = { version=">=0.0.17", package="uucore", path="../../uucore", features=["fs"] } +clap = { workspace=true } +uucore = { workspace=true, features=["fs"] } [[bin]] name = "readlink" diff --git a/src/uu/realpath/Cargo.toml b/src/uu/realpath/Cargo.toml index a077778e4..cf23d60af 100644 --- a/src/uu/realpath/Cargo.toml +++ b/src/uu/realpath/Cargo.toml @@ -15,8 +15,8 @@ edition = "2021" path = "src/realpath.rs" [dependencies] -clap = { version = "4.0", features = ["wrap_help", "cargo"] } -uucore = { version=">=0.0.17", package="uucore", path="../../uucore", features=["fs"] } +clap = { workspace=true } +uucore = { workspace=true, features=["fs"] } [[bin]] name = "realpath" diff --git a/src/uu/realpath/src/realpath.rs b/src/uu/realpath/src/realpath.rs index 7b8ac9e38..1a6d42790 100644 --- a/src/uu/realpath/src/realpath.rs +++ b/src/uu/realpath/src/realpath.rs @@ -23,7 +23,7 @@ use uucore::{ }; use uucore::{error::UClapError, show, show_if_err}; -static ABOUT: &str = "print the resolved path"; +static ABOUT: &str = "Print the resolved path"; const USAGE: &str = "{} [OPTION]... FILE..."; static OPT_QUIET: &str = "quiet"; diff --git a/src/uu/relpath/Cargo.toml b/src/uu/relpath/Cargo.toml index c37e98d86..99e37f5f8 100644 --- a/src/uu/relpath/Cargo.toml +++ b/src/uu/relpath/Cargo.toml @@ -15,8 +15,8 @@ edition = "2021" path = "src/relpath.rs" [dependencies] -clap = { version = "4.0", features = ["wrap_help", "cargo"] } -uucore = { version=">=0.0.17", package="uucore", path="../../uucore", features=["fs"] } +clap = { workspace=true } +uucore = { workspace=true, features=["fs"] } [[bin]] name = "relpath" diff --git a/src/uu/rm/Cargo.toml b/src/uu/rm/Cargo.toml index 9f169b1c0..af63aee78 100644 --- a/src/uu/rm/Cargo.toml +++ b/src/uu/rm/Cargo.toml @@ -15,16 +15,15 @@ edition = "2021" path = "src/rm.rs" [dependencies] -clap = { version = "4.0", features = ["wrap_help", "cargo"] } -walkdir = "2.2" -remove_dir_all = "0.7.0" -uucore = { version=">=0.0.17", package="uucore", path="../../uucore", features=["fs"] } +clap = { workspace=true } +walkdir = { workspace=true } +uucore = { workspace=true, features=["fs"] } [target.'cfg(unix)'.dependencies] -libc = "0.2.137" +libc = { workspace=true } [target.'cfg(windows)'.dependencies] -windows-sys = { version = "0.42.0", default-features = false, features = ["Win32_Storage_FileSystem"] } +windows-sys = { workspace=true, features = ["Win32_Storage_FileSystem"] } [[bin]] name = "rm" diff --git a/src/uu/rm/src/rm.rs b/src/uu/rm/src/rm.rs index 39b177bcf..850e18408 100644 --- a/src/uu/rm/src/rm.rs +++ b/src/uu/rm/src/rm.rs @@ -8,7 +8,6 @@ // spell-checker:ignore (path) eacces use clap::{crate_version, parser::ValueSource, Arg, ArgAction, Command}; -use remove_dir_all::remove_dir_all; use std::collections::VecDeque; use std::fs::{self, File, Metadata}; use std::io::ErrorKind; @@ -298,9 +297,7 @@ fn handle_dir(path: &Path, options: &Options) -> bool { let is_root = path.has_root() && path.parent().is_none(); if options.recursive && (!is_root || !options.preserve_root) { if options.interactive != InteractiveMode::Always && !options.verbose { - // we need the extra crate because apparently fs::remove_dir_all() does not function - // correctly on Windows - if let Err(e) = remove_dir_all(path) { + if let Err(e) = fs::remove_dir_all(path) { had_err = true; if e.kind() == std::io::ErrorKind::PermissionDenied { // GNU compatibility (rm/fail-eacces.sh) @@ -457,7 +454,7 @@ fn prompt_file(path: &Path, options: &Options, is_dir: bool) -> bool { } if is_dir { // We can't use metadata.permissions.readonly for directories because it only works on files - // So we have to handle wether a directory is writable on not manually + // So we have to handle whether a directory is writable on not manually if let Ok(metadata) = fs::metadata(path) { handle_writable_directory(path, options, &metadata) } else { diff --git a/src/uu/rmdir/Cargo.toml b/src/uu/rmdir/Cargo.toml index e804f7fa5..6e6bbcb15 100644 --- a/src/uu/rmdir/Cargo.toml +++ b/src/uu/rmdir/Cargo.toml @@ -15,9 +15,9 @@ edition = "2021" path = "src/rmdir.rs" [dependencies] -clap = { version = "4.0", features = ["wrap_help", "cargo"] } -uucore = { version=">=0.0.17", package="uucore", path="../../uucore", features=["fs"] } -libc = "0.2.137" +clap = { workspace=true } +uucore = { workspace=true, features=["fs"] } +libc = { workspace=true } [[bin]] name = "rmdir" diff --git a/src/uu/runcon/Cargo.toml b/src/uu/runcon/Cargo.toml index 74fcdf2cf..46d565223 100644 --- a/src/uu/runcon/Cargo.toml +++ b/src/uu/runcon/Cargo.toml @@ -14,11 +14,11 @@ edition = "2021" path = "src/runcon.rs" [dependencies] -clap = { version = "4.0", features = ["wrap_help", "cargo"] } -uucore = { version = ">=0.0.9", package="uucore", path="../../uucore", features=["entries", "fs", "perms"] } -selinux = { version = "0.3" } -thiserror = { version = "1.0" } -libc = { version = "0.2" } +clap = { workspace=true } +uucore = { workspace=true, features=["entries", "fs", "perms"] } +selinux = { workspace=true } +thiserror = { workspace=true } +libc = { workspace=true } [[bin]] name = "runcon" diff --git a/src/uu/seq/Cargo.toml b/src/uu/seq/Cargo.toml index 07f88fb00..d8c861aae 100644 --- a/src/uu/seq/Cargo.toml +++ b/src/uu/seq/Cargo.toml @@ -16,11 +16,11 @@ edition = "2021" path = "src/seq.rs" [dependencies] -bigdecimal = "0.3" -clap = { version = "4.0", features = ["wrap_help", "cargo"] } -num-bigint = "0.4.0" -num-traits = "0.2.15" -uucore = { version=">=0.0.17", package="uucore", path="../../uucore", features=["memo"] } +bigdecimal = { workspace=true } +clap = { workspace=true } +num-bigint = { workspace=true } +num-traits = { workspace=true } +uucore = { workspace=true, features=["memo"] } [[bin]] name = "seq" diff --git a/src/uu/shred/Cargo.toml b/src/uu/shred/Cargo.toml index 957abf766..94a741bb3 100644 --- a/src/uu/shred/Cargo.toml +++ b/src/uu/shred/Cargo.toml @@ -15,9 +15,9 @@ edition = "2021" path = "src/shred.rs" [dependencies] -clap = { version = "4.0", features = ["wrap_help", "cargo"] } -rand = "0.8" -uucore = { version=">=0.0.17", package="uucore", path="../../uucore" } +clap = { workspace=true } +rand = { workspace=true } +uucore = { workspace=true } [[bin]] name = "shred" diff --git a/src/uu/shuf/Cargo.toml b/src/uu/shuf/Cargo.toml index 98159b8c3..eed9065c7 100644 --- a/src/uu/shuf/Cargo.toml +++ b/src/uu/shuf/Cargo.toml @@ -15,11 +15,11 @@ edition = "2021" path = "src/shuf.rs" [dependencies] -clap = { version = "4.0", features = ["wrap_help", "cargo"] } -memchr = "2.5.0" -rand = "0.8" -rand_core = "0.6" -uucore = { version=">=0.0.17", package="uucore", path="../../uucore" } +clap = { workspace=true } +memchr = { workspace=true } +rand = { workspace=true } +rand_core = { workspace=true } +uucore = { workspace=true } [[bin]] name = "shuf" diff --git a/src/uu/sleep/Cargo.toml b/src/uu/sleep/Cargo.toml index 8c21c895e..048f551c1 100644 --- a/src/uu/sleep/Cargo.toml +++ b/src/uu/sleep/Cargo.toml @@ -15,8 +15,8 @@ edition = "2021" path = "src/sleep.rs" [dependencies] -clap = { version = "4.0", features = ["wrap_help", "cargo"] } -uucore = { version=">=0.0.17", package="uucore", path="../../uucore" } +clap = { workspace=true } +uucore = { workspace=true } [[bin]] name = "sleep" diff --git a/src/uu/sort/Cargo.toml b/src/uu/sort/Cargo.toml index d12dd57cf..e940d08e5 100644 --- a/src/uu/sort/Cargo.toml +++ b/src/uu/sort/Cargo.toml @@ -15,19 +15,19 @@ edition = "2021" path = "src/sort.rs" [dependencies] -binary-heap-plus = "0.5.0" -clap = { version = "4.0", features = ["wrap_help", "cargo"] } -compare = "0.1.0" -ctrlc = { version = "3.0", features = ["termination"] } -fnv = "1.0.7" -itertools = "0.10.0" -memchr = "2.5.0" -ouroboros = "0.15.5" -rand = "0.8" -rayon = "1.5" -tempfile = "3" -unicode-width = "0.1.8" -uucore = { version=">=0.0.17", package="uucore", path="../../uucore", features=["fs"] } +binary-heap-plus = { workspace=true } +clap = { workspace=true } +compare = { workspace=true } +ctrlc = { workspace=true } +fnv = { workspace=true } +itertools = { workspace=true } +memchr = { workspace=true } +ouroboros = { workspace=true } +rand = { workspace=true } +rayon = { workspace=true } +tempfile = { workspace=true } +unicode-width = { workspace=true } +uucore = { workspace=true, features=["fs"] } [[bin]] name = "sort" diff --git a/src/uu/split/Cargo.toml b/src/uu/split/Cargo.toml index 9d5a9e3ba..2d379a373 100644 --- a/src/uu/split/Cargo.toml +++ b/src/uu/split/Cargo.toml @@ -15,9 +15,9 @@ edition = "2021" path = "src/split.rs" [dependencies] -clap = { version = "4.0", features = ["wrap_help", "cargo"] } -memchr = "2" -uucore = { version=">=0.0.17", package="uucore", path="../../uucore", features=["fs"] } +clap = { workspace=true } +memchr = { workspace=true } +uucore = { workspace=true, features=["fs"] } [[bin]] name = "split" diff --git a/src/uu/stat/Cargo.toml b/src/uu/stat/Cargo.toml index 2f32abc51..1c84eaf1e 100644 --- a/src/uu/stat/Cargo.toml +++ b/src/uu/stat/Cargo.toml @@ -15,8 +15,8 @@ edition = "2021" path = "src/stat.rs" [dependencies] -clap = { version = "4.0", features = ["wrap_help", "cargo"] } -uucore = { version=">=0.0.17", package="uucore", path="../../uucore", features=["entries", "libc", "fs", "fsext"] } +clap = { workspace=true } +uucore = { workspace=true, features=["entries", "libc", "fs", "fsext"] } [[bin]] name = "stat" diff --git a/src/uu/stdbuf/Cargo.toml b/src/uu/stdbuf/Cargo.toml index aad0d29e1..164188f9f 100644 --- a/src/uu/stdbuf/Cargo.toml +++ b/src/uu/stdbuf/Cargo.toml @@ -15,9 +15,9 @@ edition = "2021" path = "src/stdbuf.rs" [dependencies] -clap = { version = "4.0", features = ["wrap_help", "cargo"] } -tempfile = "3" -uucore = { version=">=0.0.17", package="uucore", path="../../uucore" } +clap = { workspace=true } +tempfile = { workspace=true } +uucore = { workspace=true } [build-dependencies] libstdbuf = { version="0.0.17", package="uu_stdbuf_libstdbuf", path="src/libstdbuf" } diff --git a/src/uu/stdbuf/src/libstdbuf/Cargo.toml b/src/uu/stdbuf/src/libstdbuf/Cargo.toml index c40f3aa86..2498f7671 100644 --- a/src/uu/stdbuf/src/libstdbuf/Cargo.toml +++ b/src/uu/stdbuf/src/libstdbuf/Cargo.toml @@ -18,7 +18,7 @@ crate-type = ["cdylib", "rlib"] # XXX: note: the rlib is just to prevent Cargo f [dependencies] cpp = "0.5" -libc = "0.2" +libc = { workspace=true } uucore = { version=">=0.0.17", package="uucore", path="../../../../uucore" } [build-dependencies] diff --git a/src/uu/stty/Cargo.toml b/src/uu/stty/Cargo.toml index 06e926e68..9c94f8cb1 100644 --- a/src/uu/stty/Cargo.toml +++ b/src/uu/stty/Cargo.toml @@ -15,9 +15,9 @@ edition = "2021" path = "src/stty.rs" [dependencies] -clap = { version = "4.0", features = ["wrap_help", "cargo"] } -uucore = { version=">=0.0.17", package="uucore", path="../../uucore" } -nix = { version="0.25", features = ["term"] } +clap = { workspace=true } +uucore = { workspace=true } +nix = { workspace=true, features = ["term", "ioctl"] } [[bin]] name = "stty" diff --git a/src/uu/sum/Cargo.toml b/src/uu/sum/Cargo.toml index bcc53d11c..0997f22fc 100644 --- a/src/uu/sum/Cargo.toml +++ b/src/uu/sum/Cargo.toml @@ -15,8 +15,8 @@ edition = "2021" path = "src/sum.rs" [dependencies] -clap = { version = "4.0", features = ["wrap_help", "cargo"] } -uucore = { version=">=0.0.17", package="uucore", path="../../uucore" } +clap = { workspace=true } +uucore = { workspace=true } [[bin]] name = "sum" diff --git a/src/uu/sync/Cargo.toml b/src/uu/sync/Cargo.toml index f357cdc62..19696d881 100644 --- a/src/uu/sync/Cargo.toml +++ b/src/uu/sync/Cargo.toml @@ -15,15 +15,15 @@ edition = "2021" path = "src/sync.rs" [dependencies] -clap = { version = "4.0", features = ["wrap_help", "cargo"] } -libc = "0.2.137" -uucore = { version=">=0.0.17", package="uucore", path="../../uucore", features=["wide"] } +clap = { workspace=true } +libc = { workspace=true } +uucore = { workspace=true, features=["wide"] } [target.'cfg(any(target_os = "linux", target_os = "android"))'.dependencies] -nix = "0.25" +nix = { workspace=true } [target.'cfg(target_os = "windows")'.dependencies] -windows-sys = { version = "0.42.0", default-features = false, features = ["Win32_Storage_FileSystem", "Win32_System_WindowsProgramming", "Win32_Foundation"] } +windows-sys = { workspace=true, features = ["Win32_Storage_FileSystem", "Win32_System_WindowsProgramming", "Win32_Foundation"] } [[bin]] name = "sync" diff --git a/src/uu/tac/Cargo.toml b/src/uu/tac/Cargo.toml index 31a177e4a..3df365bad 100644 --- a/src/uu/tac/Cargo.toml +++ b/src/uu/tac/Cargo.toml @@ -17,11 +17,11 @@ edition = "2021" path = "src/tac.rs" [dependencies] -memchr = "2" +memchr = { workspace=true } memmap2 = "0.5" -regex = "1" -clap = { version = "4.0", features = ["wrap_help", "cargo"] } -uucore = { version=">=0.0.17", package="uucore", path="../../uucore" } +regex = { workspace=true } +clap = { workspace=true } +uucore = { workspace=true } [[bin]] name = "tac" diff --git a/src/uu/tail/Cargo.toml b/src/uu/tail/Cargo.toml index 9ad6d8609..d6dbf2fb7 100644 --- a/src/uu/tail/Cargo.toml +++ b/src/uu/tail/Cargo.toml @@ -1,4 +1,3 @@ -# spell-checker:ignore (libs) kqueue [package] name = "uu_tail" version = "0.0.17" @@ -16,20 +15,20 @@ edition = "2021" path = "src/tail.rs" [dependencies] -clap = { version = "4.0", features = ["wrap_help", "cargo"] } -libc = "0.2.137" -memchr = "2.5.0" -notify = { version = "=5.0.0", features=["macos_kqueue"]} -uucore = { version=">=0.0.17", package="uucore", path="../../uucore", features=["ringbuffer", "lines"] } -same-file = "1.0.6" -atty = "0.2" +clap = { workspace=true } +libc = { workspace=true } +memchr = { workspace=true } +notify = { workspace=true } +uucore = { workspace=true, features=["ringbuffer", "lines"] } +same-file = { workspace=true } +atty = { workspace=true } [target.'cfg(windows)'.dependencies] -windows-sys = { version = "0.42.0", default-features = false, features = ["Win32_System_Threading", "Win32_Foundation"] } -winapi-util = { version="0.1.5" } +windows-sys = { workspace=true, features = ["Win32_System_Threading", "Win32_Foundation"] } +winapi-util = { workspace=true } [target.'cfg(unix)'.dependencies] -nix = { version = "0.25", features = ["fs"] } +nix = { workspace=true, features = ["fs"] } [[bin]] name = "tail" diff --git a/src/uu/tee/Cargo.toml b/src/uu/tee/Cargo.toml index 139e3df3c..52a2accea 100644 --- a/src/uu/tee/Cargo.toml +++ b/src/uu/tee/Cargo.toml @@ -15,10 +15,9 @@ edition = "2021" path = "src/tee.rs" [dependencies] -clap = { version = "4.0", features = ["wrap_help", "cargo"] } -libc = "0.2.137" -retain_mut = "=0.1.7" # ToDO: [2021-01-01; rivy; maint/MinSRV] ~ v0.1.5 uses const generics which aren't stabilized until rust v1.51.0 -uucore = { version=">=0.0.17", package="uucore", path="../../uucore", features=["libc"] } +clap = { workspace=true } +libc = { workspace=true } +uucore = { workspace=true, features=["libc"] } [[bin]] name = "tee" diff --git a/src/uu/tee/src/tee.rs b/src/uu/tee/src/tee.rs index 67b16f843..71b5edc5c 100644 --- a/src/uu/tee/src/tee.rs +++ b/src/uu/tee/src/tee.rs @@ -6,7 +6,6 @@ // * file that was distributed with this source code. use clap::{builder::PossibleValue, crate_version, Arg, ArgAction, Command}; -use retain_mut::RetainMut; use std::fs::OpenOptions; use std::io::{copy, sink, stdin, stdout, Error, ErrorKind, Read, Result, Write}; use std::path::PathBuf; @@ -301,7 +300,7 @@ impl Write for MultiWriter { let mut aborted = None; let mode = self.output_error_mode.clone(); let mut errors = 0; - RetainMut::retain_mut(&mut self.writers, |writer| { + self.writers.retain_mut(|writer| { let result = writer.write_all(buf); match result { Err(f) => { @@ -332,7 +331,7 @@ impl Write for MultiWriter { let mut aborted = None; let mode = self.output_error_mode.clone(); let mut errors = 0; - RetainMut::retain_mut(&mut self.writers, |writer| { + self.writers.retain_mut(|writer| { let result = writer.flush(); match result { Err(f) => { diff --git a/src/uu/test/Cargo.toml b/src/uu/test/Cargo.toml index 396373f49..5e7d2e23a 100644 --- a/src/uu/test/Cargo.toml +++ b/src/uu/test/Cargo.toml @@ -15,12 +15,12 @@ edition = "2021" path = "src/test.rs" [dependencies] -clap = { version = "4.0", features = ["wrap_help", "cargo"] } -libc = "0.2.137" -uucore = { version=">=0.0.17", package="uucore", path="../../uucore" } +clap = { workspace=true } +libc = { workspace=true } +uucore = { workspace=true } [target.'cfg(target_os = "redox")'.dependencies] -redox_syscall = "0.2" +redox_syscall = { workspace=true } [[bin]] name = "test" diff --git a/src/uu/timeout/Cargo.toml b/src/uu/timeout/Cargo.toml index ab71bad9a..b19a2e999 100644 --- a/src/uu/timeout/Cargo.toml +++ b/src/uu/timeout/Cargo.toml @@ -15,10 +15,10 @@ edition = "2021" path = "src/timeout.rs" [dependencies] -clap = { version = "4.0", features = ["wrap_help", "cargo"] } -libc = "0.2.137" -nix = { version = "0.25", default-features = false, features = ["signal"] } -uucore = { version=">=0.0.17", package="uucore", path="../../uucore", features=["process", "signals"] } +clap = { workspace=true } +libc = { workspace=true } +nix = { workspace=true, features = ["signal"] } +uucore = { workspace=true, features=["process", "signals"] } [[bin]] name = "timeout" diff --git a/src/uu/touch/Cargo.toml b/src/uu/touch/Cargo.toml index 40ee899af..1fad22c02 100644 --- a/src/uu/touch/Cargo.toml +++ b/src/uu/touch/Cargo.toml @@ -15,13 +15,13 @@ edition = "2021" path = "src/touch.rs" [dependencies] -filetime = "0.2.18" -clap = { version = "4.0", features = ["wrap_help", "cargo"] } -time = { version = "0.3", features = ["parsing", "formatting", "local-offset", "macros"] } -uucore = { version=">=0.0.17", package="uucore", path="../../uucore", features=["libc"] } +filetime = { workspace=true } +clap = { workspace=true } +time = { workspace=true, features = ["parsing", "formatting", "local-offset", "macros"] } +uucore = { workspace=true, features=["libc"] } [target.'cfg(target_os = "windows")'.dependencies] -windows-sys = { version = "0.42.0", default-features = false, features = ["Win32_Storage_FileSystem", "Win32_Foundation"] } +windows-sys = { workspace=true, features = ["Win32_Storage_FileSystem", "Win32_Foundation"] } [[bin]] name = "touch" diff --git a/src/uu/tr/Cargo.toml b/src/uu/tr/Cargo.toml index 992423999..eee6c7cd6 100644 --- a/src/uu/tr/Cargo.toml +++ b/src/uu/tr/Cargo.toml @@ -15,9 +15,9 @@ edition = "2021" path = "src/tr.rs" [dependencies] -nom = "7.1.1" -clap = { version = "4.0", features = ["wrap_help", "cargo"] } -uucore = { version=">=0.0.17", package="uucore", path="../../uucore" } +nom = { workspace=true } +clap = { workspace=true } +uucore = { workspace=true } [[bin]] name = "tr" diff --git a/src/uu/tr/src/tr.rs b/src/uu/tr/src/tr.rs index 8ca128a09..d63f8bced 100644 --- a/src/uu/tr/src/tr.rs +++ b/src/uu/tr/src/tr.rs @@ -19,7 +19,7 @@ use crate::operation::DeleteOperation; use uucore::display::Quotable; use uucore::error::{UResult, USimpleError, UUsageError}; -static ABOUT: &str = "translate or delete characters"; +static ABOUT: &str = "Translate or delete characters"; const USAGE: &str = "{} [OPTION]... SET1 [SET2]"; mod options { diff --git a/src/uu/true/Cargo.toml b/src/uu/true/Cargo.toml index ef92d33a4..9954c2906 100644 --- a/src/uu/true/Cargo.toml +++ b/src/uu/true/Cargo.toml @@ -15,8 +15,8 @@ edition = "2021" path = "src/true.rs" [dependencies] -clap = { version = "4.0", features = ["wrap_help", "cargo"] } -uucore = { version=">=0.0.17", package="uucore", path="../../uucore" } +clap = { workspace=true } +uucore = { workspace=true } [[bin]] name = "true" diff --git a/src/uu/truncate/Cargo.toml b/src/uu/truncate/Cargo.toml index 919ab4fab..e93751e89 100644 --- a/src/uu/truncate/Cargo.toml +++ b/src/uu/truncate/Cargo.toml @@ -15,8 +15,8 @@ edition = "2021" path = "src/truncate.rs" [dependencies] -clap = { version = "4.0", features = ["wrap_help", "cargo"] } -uucore = { version=">=0.0.17", package="uucore", path="../../uucore" } +clap = { workspace=true } +uucore = { workspace=true } [[bin]] name = "truncate" diff --git a/src/uu/tsort/Cargo.toml b/src/uu/tsort/Cargo.toml index 63eeb111a..2737454eb 100644 --- a/src/uu/tsort/Cargo.toml +++ b/src/uu/tsort/Cargo.toml @@ -15,8 +15,8 @@ edition = "2021" path = "src/tsort.rs" [dependencies] -clap = { version = "4.0", features = ["wrap_help", "cargo"] } -uucore = { version=">=0.0.17", package="uucore", path="../../uucore" } +clap = { workspace=true } +uucore = { workspace=true } [[bin]] name = "tsort" diff --git a/src/uu/tty/Cargo.toml b/src/uu/tty/Cargo.toml index d71f08d10..34eb84570 100644 --- a/src/uu/tty/Cargo.toml +++ b/src/uu/tty/Cargo.toml @@ -15,10 +15,10 @@ edition = "2021" path = "src/tty.rs" [dependencies] -clap = { version = "4.0", features = ["wrap_help", "cargo"] } -nix = "0.25" -atty = "0.2" -uucore = { version=">=0.0.17", package="uucore", path="../../uucore", features=["fs"] } +clap = { workspace=true } +nix = { workspace=true, features=["term"] } +atty = { workspace=true } +uucore = { workspace=true, features=["fs"] } [[bin]] name = "tty" diff --git a/src/uu/uname/Cargo.toml b/src/uu/uname/Cargo.toml index bcd68f1e8..818e6dd06 100644 --- a/src/uu/uname/Cargo.toml +++ b/src/uu/uname/Cargo.toml @@ -15,9 +15,9 @@ edition = "2021" path = "src/uname.rs" [dependencies] -platform-info = "1.0.2" -clap = { version = "4.0", features = ["wrap_help", "cargo"] } -uucore = { version=">=0.0.17", package="uucore", path="../../uucore" } +platform-info = { workspace=true } +clap = { workspace=true } +uucore = { workspace=true } [[bin]] name = "uname" diff --git a/src/uu/unexpand/Cargo.toml b/src/uu/unexpand/Cargo.toml index bd858732e..a80bcdaf5 100644 --- a/src/uu/unexpand/Cargo.toml +++ b/src/uu/unexpand/Cargo.toml @@ -15,9 +15,9 @@ edition = "2021" path = "src/unexpand.rs" [dependencies] -clap = { version = "4.0", features = ["wrap_help", "cargo"] } -unicode-width = "0.1.5" -uucore = { version=">=0.0.17", package="uucore", path="../../uucore" } +clap = { workspace=true } +unicode-width = { workspace=true } +uucore = { workspace=true } [[bin]] name = "unexpand" diff --git a/src/uu/uniq/Cargo.toml b/src/uu/uniq/Cargo.toml index 98432caf0..f1b615ea8 100644 --- a/src/uu/uniq/Cargo.toml +++ b/src/uu/uniq/Cargo.toml @@ -15,10 +15,10 @@ edition = "2021" path = "src/uniq.rs" [dependencies] -clap = { version = "4.0", features = ["wrap_help", "cargo"] } -strum = "0.24.1" -strum_macros = "0.24.2" -uucore = { version=">=0.0.17", package="uucore", path="../../uucore" } +clap = { workspace=true } +strum = { workspace=true } +strum_macros = { workspace=true } +uucore = { workspace=true } [[bin]] name = "uniq" diff --git a/src/uu/uniq/src/uniq.rs b/src/uu/uniq/src/uniq.rs index cbbd988cb..7275e8877 100644 --- a/src/uu/uniq/src/uniq.rs +++ b/src/uu/uniq/src/uniq.rs @@ -5,9 +5,6 @@ // * For the full copyright and license information, please view the LICENSE // * file that was distributed with this source code. -// TODO remove this when https://github.com/rust-lang/rust-clippy/issues/6902 is fixed -#![allow(clippy::use_self)] - use clap::{crate_version, Arg, ArgAction, ArgMatches, Command}; use std::fs::File; use std::io::{self, stdin, stdout, BufRead, BufReader, BufWriter, Read, Write}; diff --git a/src/uu/unlink/Cargo.toml b/src/uu/unlink/Cargo.toml index f63757fba..6b300dab0 100644 --- a/src/uu/unlink/Cargo.toml +++ b/src/uu/unlink/Cargo.toml @@ -15,8 +15,8 @@ edition = "2021" path = "src/unlink.rs" [dependencies] -clap = { version = "4.0", features = ["wrap_help", "cargo"] } -uucore = { version=">=0.0.17", package="uucore", path="../../uucore" } +clap = { workspace=true } +uucore = { workspace=true } [[bin]] name = "unlink" diff --git a/src/uu/uptime/Cargo.toml b/src/uu/uptime/Cargo.toml index 99d60c309..a38a030e8 100644 --- a/src/uu/uptime/Cargo.toml +++ b/src/uu/uptime/Cargo.toml @@ -15,9 +15,9 @@ edition = "2021" path = "src/uptime.rs" [dependencies] -chrono = { version="^0.4.23", default-features=false, features=["std", "alloc", "clock"]} -clap = { version = "4.0", features = ["wrap_help", "cargo"] } -uucore = { version=">=0.0.17", package="uucore", path="../../uucore", features=["libc", "utmpx"] } +chrono = { workspace=true } +clap = { workspace=true } +uucore = { workspace=true, features=["libc", "utmpx"] } [[bin]] name = "uptime" diff --git a/src/uu/users/Cargo.toml b/src/uu/users/Cargo.toml index 658c3c25a..32abd1581 100644 --- a/src/uu/users/Cargo.toml +++ b/src/uu/users/Cargo.toml @@ -15,8 +15,8 @@ edition = "2021" path = "src/users.rs" [dependencies] -clap = { version = "4.0", features = ["wrap_help", "cargo"] } -uucore = { version=">=0.0.17", package="uucore", path="../../uucore", features=["utmpx"] } +clap = { workspace=true } +uucore = { workspace=true, features=["utmpx"] } [[bin]] name = "users" diff --git a/src/uu/vdir/Cargo.toml b/src/uu/vdir/Cargo.toml index 9576770ab..569807af6 100644 --- a/src/uu/vdir/Cargo.toml +++ b/src/uu/vdir/Cargo.toml @@ -15,9 +15,9 @@ edition = "2021" path = "src/vdir.rs" [dependencies] -clap = { version = "4.0", features = ["wrap_help", "cargo", "env"] } -uucore = { version=">=0.0.17", package="uucore", path="../../uucore", features=["entries", "fs"] } -uu_ls = { version = ">=0.0.17", path="../ls"} +clap = { workspace=true, features = ["env"] } +uucore = { workspace=true, features=["entries", "fs"] } +uu_ls = { workspace=true } [[bin]] name = "vdir" diff --git a/src/uu/wc/Cargo.toml b/src/uu/wc/Cargo.toml index 6d30267a8..40e0fd03b 100644 --- a/src/uu/wc/Cargo.toml +++ b/src/uu/wc/Cargo.toml @@ -15,15 +15,15 @@ edition = "2021" path = "src/wc.rs" [dependencies] -clap = { version = "4.0", features = ["wrap_help", "cargo"] } -uucore = { version=">=0.0.17", package="uucore", path="../../uucore", features=["pipes"] } -bytecount = "0.6.3" -utf-8 = "0.7.6" -unicode-width = "0.1.8" +clap = { workspace=true } +uucore = { workspace=true, features=["pipes"] } +bytecount = { workspace=true } +utf-8 = { workspace=true } +unicode-width = { workspace=true } [target.'cfg(unix)'.dependencies] -nix = { version = "0.25", default-features = false } -libc = "0.2" +nix = { workspace=true } +libc = { workspace=true } [[bin]] name = "wc" diff --git a/src/uu/who/Cargo.toml b/src/uu/who/Cargo.toml index cd1af860d..31c557508 100644 --- a/src/uu/who/Cargo.toml +++ b/src/uu/who/Cargo.toml @@ -15,8 +15,8 @@ edition = "2021" path = "src/who.rs" [dependencies] -clap = { version = "4.0", features = ["wrap_help", "cargo"] } -uucore = { version=">=0.0.17", package="uucore", path="../../uucore", features=["utmpx"] } +clap = { workspace=true } +uucore = { workspace=true, features=["utmpx"] } [[bin]] name = "who" diff --git a/src/uu/whoami/Cargo.toml b/src/uu/whoami/Cargo.toml index 9d576453f..15a7ad4ce 100644 --- a/src/uu/whoami/Cargo.toml +++ b/src/uu/whoami/Cargo.toml @@ -15,14 +15,14 @@ edition = "2021" path = "src/whoami.rs" [dependencies] -clap = { version = "4.0", features = ["wrap_help", "cargo"] } -uucore = { version=">=0.0.17", package="uucore", path="../../uucore", features=["entries"] } +clap = { workspace=true } +uucore = { workspace=true, features=["entries"] } [target.'cfg(target_os = "windows")'.dependencies] -windows-sys = { version = "0.42.0", default-features = false, features = ["Win32_NetworkManagement_NetManagement", "Win32_System_WindowsProgramming", "Win32_Foundation"] } +windows-sys = { workspace=true, features = ["Win32_NetworkManagement_NetManagement", "Win32_System_WindowsProgramming", "Win32_Foundation"] } [target.'cfg(unix)'.dependencies] -libc = "0.2.137" +libc = { workspace=true } [[bin]] name = "whoami" diff --git a/src/uu/yes/Cargo.toml b/src/uu/yes/Cargo.toml index ff52de031..cf120f2e0 100644 --- a/src/uu/yes/Cargo.toml +++ b/src/uu/yes/Cargo.toml @@ -15,12 +15,12 @@ edition = "2021" path = "src/yes.rs" [dependencies] -clap = { version = "4.0", features = ["wrap_help", "cargo"] } -libc = "0.2.137" -uucore = { version=">=0.0.17", package="uucore", path="../../uucore", features=["pipes"] } +clap = { workspace=true } +libc = { workspace=true } +uucore = { workspace=true, features=["pipes"] } [target.'cfg(any(target_os = "linux", target_os = "android"))'.dependencies] -nix = { version = "0.25", default-features = false } +nix = { workspace=true } [[bin]] name = "yes" diff --git a/src/uu/yes/src/yes.rs b/src/uu/yes/src/yes.rs index 09d4e5955..22ccebab2 100644 --- a/src/uu/yes/src/yes.rs +++ b/src/uu/yes/src/yes.rs @@ -17,7 +17,7 @@ use uucore::format_usage; #[cfg(any(target_os = "linux", target_os = "android"))] mod splice; -const ABOUT: &str = "repeatedly display a line with STRING (or 'y')"; +const ABOUT: &str = "Repeatedly display a line with STRING (or 'y')"; const USAGE: &str = "{} [STRING]..."; // it's possible that using a smaller or larger buffer might provide better performance on some diff --git a/src/uucore/Cargo.toml b/src/uucore/Cargo.toml index 6264d7665..d4d8b8cf2 100644 --- a/src/uucore/Cargo.toml +++ b/src/uucore/Cargo.toml @@ -18,31 +18,31 @@ edition = "2021" path="src/lib/lib.rs" [dependencies] -uucore_procs = { version=">=0.0.17", path="../uucore_procs" } -clap = "4.0" +clap = { workspace=true } +uucore_procs = { workspace=true } dns-lookup = { version="1.0.5", optional=true } dunce = "1.0.3" wild = "2.0" glob = "0.3.0" # * optional itertools = { version="0.10.0", optional=true } -thiserror = { version="1.0", optional=true } -time = { version="0.3", optional=true, features = ["formatting", "local-offset", "macros"] } +thiserror = { workspace=true, optional=true } +time = { workspace=true, optional=true, features = ["formatting", "local-offset", "macros"] } # * "problem" dependencies (pinned) data-encoding = { version="2.1", optional=true } data-encoding-macro = { version="0.1.12", optional=true } z85 = { version="3.0.5", optional=true } libc = { version="0.2.137", optional=true } -once_cell = "1.13.1" +once_cell = { workspace=true } os_display = "0.1.3" [target.'cfg(unix)'.dependencies] -walkdir = { version="2.3.2", optional=true } -nix = { version = "0.25", default-features = false, features = ["fs", "uio", "zerocopy"] } +walkdir = { workspace=true, optional=true } +nix = { workspace=true, features = ["fs", "uio", "zerocopy"] } [dev-dependencies] -clap = "4.0" -once_cell = "1.13" +clap = { workspace=true } +once_cell = { workspace=true } [target.'cfg(target_os = "windows")'.dependencies] winapi-util = { version= "0.1.5", optional=true } diff --git a/src/uucore/src/lib/features/memo.rs b/src/uucore/src/lib/features/memo.rs index 517efc9e2..47d04f5b8 100644 --- a/src/uucore/src/lib/features/memo.rs +++ b/src/uucore/src/lib/features/memo.rs @@ -154,7 +154,7 @@ mod tests { #[test] fn test_sprintf_smoke() { - assert_eq!(sprintf("", &[]).unwrap(), "".to_string()) + assert_eq!(sprintf("", &[]).unwrap(), "".to_string()); } #[test] @@ -162,7 +162,7 @@ mod tests { assert_eq!( sprintf("hello world", &[]).unwrap(), "hello world".to_string() - ) + ); } #[test] @@ -170,6 +170,6 @@ mod tests { assert_eq!( sprintf("hello %s", &["world".to_string()]).unwrap(), "hello world".to_string() - ) + ); } } diff --git a/src/uucore/src/lib/mods/error.rs b/src/uucore/src/lib/mods/error.rs index 8f1b2f3ec..5d4527d74 100644 --- a/src/uucore/src/lib/mods/error.rs +++ b/src/uucore/src/lib/mods/error.rs @@ -771,6 +771,6 @@ mod tests { .map_err_context(|| String::from("test")) .unwrap_err() .to_string() - ) + ); } } diff --git a/tests/by-util/test_comm.rs b/tests/by-util/test_comm.rs index cea4d500c..a69a6009b 100644 --- a/tests/by-util/test_comm.rs +++ b/tests/by-util/test_comm.rs @@ -178,16 +178,14 @@ fn unintuitive_default_behavior_1() { .stdout_only_fixture("defaultcheck_unintuitive.expected"); } -#[ignore] //bug? should help be stdout if not called via -h|--help? #[test] fn no_arguments() { - new_ucmd!().fails().no_stdout().no_stderr(); + new_ucmd!().fails().no_stdout(); } -#[ignore] //bug? should help be stdout if not called via -h|--help? #[test] fn one_argument() { - new_ucmd!().arg("a").fails().no_stdout().no_stderr(); + new_ucmd!().arg("a").fails().no_stdout(); } #[test] diff --git a/tests/by-util/test_pr.rs b/tests/by-util/test_pr.rs index 4e2667b6f..ae18464db 100644 --- a/tests/by-util/test_pr.rs +++ b/tests/by-util/test_pr.rs @@ -417,7 +417,6 @@ fn test_with_pr_core_utils_tests() { let value = file_last_modified_time(&scenario, test_file_path); let mut arguments: Vec<&str> = flags .split(' ') - .into_iter() .filter(|i| i.trim() != "") .collect::>(); diff --git a/tests/by-util/test_rmdir.rs b/tests/by-util/test_rmdir.rs index df86e2423..4cf84407c 100644 --- a/tests/by-util/test_rmdir.rs +++ b/tests/by-util/test_rmdir.rs @@ -174,17 +174,12 @@ fn test_verbose_nested_failure() { #[cfg(unix)] #[test] fn test_rmdir_ignore_nonempty_no_permissions() { - use std::fs; - let (at, mut ucmd) = at_and_ucmd!(); // We make the *parent* dir read-only to prevent deleting the dir in it. at.mkdir_all("dir/ect/ory"); at.touch("dir/ect/ory/file"); - let dir_ect = at.plus("dir/ect"); - let mut perms = fs::metadata(&dir_ect).unwrap().permissions(); - perms.set_readonly(true); - fs::set_permissions(&dir_ect, perms.clone()).unwrap(); + at.set_mode("dir/ect", 0o555); // rmdir should now get a permissions error that it interprets as // a non-empty error. @@ -196,8 +191,7 @@ fn test_rmdir_ignore_nonempty_no_permissions() { assert!(at.dir_exists("dir/ect/ory")); // Politely restore permissions for cleanup - perms.set_readonly(false); - fs::set_permissions(&dir_ect, perms).unwrap(); + at.set_mode("dir/ect", 0o755); } #[test]