diff --git a/Cargo.lock b/Cargo.lock index 30c808495..f7fb30ba2 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1882,7 +1882,7 @@ name = "whoami" version = "0.0.1" dependencies = [ "advapi32-sys 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", - "getopts 0.2.17 (registry+https://github.com/rust-lang/crates.io-index)", + "clap 2.31.1 (registry+https://github.com/rust-lang/crates.io-index)", "uucore 0.0.1", "winapi 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", ] diff --git a/src/arch/Cargo.toml b/src/arch/Cargo.toml index 052233759..5d8703f80 100644 --- a/src/arch/Cargo.toml +++ b/src/arch/Cargo.toml @@ -10,10 +10,7 @@ path = "arch.rs" [dependencies] platform-info = { git = "https://github.com/uutils/platform-info" } - -[dependencies.uucore] -path = "../uucore" -default-features = false +uucore = { path = "../uucore" } [[bin]] name = "arch" diff --git a/src/base32/Cargo.toml b/src/base32/Cargo.toml index 683f3f350..4ac1b296b 100644 --- a/src/base32/Cargo.toml +++ b/src/base32/Cargo.toml @@ -8,8 +8,9 @@ build = "../../mkmain.rs" name = "uu_base32" path = "base32.rs" -[dependencies] -uucore = { path="../uucore" } +[dependencies.uucore] +path = "../uucore" +features = ["encoding"] [dependencies.clippy] version = "0.0.143" diff --git a/src/base64/Cargo.toml b/src/base64/Cargo.toml index 1c6e88171..dc25dea95 100644 --- a/src/base64/Cargo.toml +++ b/src/base64/Cargo.toml @@ -8,8 +8,9 @@ build = "../../mkmain.rs" name = "uu_base64" path = "base64.rs" -[dependencies] -uucore = { path="../uucore" } +[dependencies.uucore] +path = "../uucore" +features = ["encoding"] [[bin]] name = "base64" diff --git a/src/cat/Cargo.toml b/src/cat/Cargo.toml index f0d52e9a0..135b8ddea 100644 --- a/src/cat/Cargo.toml +++ b/src/cat/Cargo.toml @@ -10,7 +10,10 @@ path = "cat.rs" [dependencies] quick-error = "1.1.0" -uucore = { path="../uucore" } + +[dependencies.uucore] +path = "../uucore" +features = ["fs"] [target.'cfg(unix)'.dependencies] unix_socket = "0.5.0" diff --git a/src/chgrp/Cargo.toml b/src/chgrp/Cargo.toml index 6f338234e..08be38d9f 100644 --- a/src/chgrp/Cargo.toml +++ b/src/chgrp/Cargo.toml @@ -13,7 +13,6 @@ walkdir = "1.0.7" [dependencies.uucore] path = "../uucore" -default-features = false features = ["entries", "fs"] [[bin]] diff --git a/src/chmod/Cargo.toml b/src/chmod/Cargo.toml index f4b89c8ad..85760b5a2 100644 --- a/src/chmod/Cargo.toml +++ b/src/chmod/Cargo.toml @@ -10,9 +10,12 @@ path = "chmod.rs" [dependencies] libc = "0.2.26" -uucore = { path="../uucore" } walker = "1.0.0" +[dependencies.uucore] +path = "../uucore" +features = ["mode"] + [[bin]] name = "chmod" path = "../../uumain.rs" diff --git a/src/chown/Cargo.toml b/src/chown/Cargo.toml index ceff8e315..7e94ada42 100644 --- a/src/chown/Cargo.toml +++ b/src/chown/Cargo.toml @@ -14,7 +14,6 @@ walkdir = "0.1" [dependencies.uucore] path = "../uucore" -default-features = false features = ["entries", "fs"] [dependencies.clippy] diff --git a/src/chroot/Cargo.toml b/src/chroot/Cargo.toml index 450d9e897..d5bcba708 100644 --- a/src/chroot/Cargo.toml +++ b/src/chroot/Cargo.toml @@ -13,7 +13,6 @@ getopts = "0.2.14" [dependencies.uucore] path = "../uucore" -default-features = false features = ["entries"] [[bin]] diff --git a/src/cp/Cargo.toml b/src/cp/Cargo.toml index 022843562..b529c40b7 100644 --- a/src/cp/Cargo.toml +++ b/src/cp/Cargo.toml @@ -17,9 +17,12 @@ libc = "0.2.26" walkdir = "1.0.7" clap = "2.20.0" quick-error = "1.1.0" -uucore = { path="../uucore" } filetime = "0.1" +[dependencies.uucore] +path = "../uucore" +features = ["fs"] + [target.'cfg(target_os = "linux")'.dependencies] ioctl-sys = "0.5.2" diff --git a/src/env/env.rs b/src/env/env.rs index 1aa8520ff..8b7af61bf 100644 --- a/src/env/env.rs +++ b/src/env/env.rs @@ -9,7 +9,6 @@ */ /* last synced with: env (GNU coreutils) 8.13 */ -#![allow(non_camel_case_types)] #[macro_use] extern crate uucore; @@ -25,7 +24,7 @@ static LONG_HELP: &'static str = " A mere - implies -i. If no COMMAND, print the resulting environment "; -struct options { +struct Options { ignore_env: bool, null: bool, unsets: Vec, @@ -52,7 +51,7 @@ pub fn uumain(args: Vec) -> i32 { ) .optopt("u", "unset", "remove variable from the environment", "NAME"); - let mut opts = Box::new(options { + let mut opts = Box::new(Options { ignore_env: false, null: false, unsets: vec![], diff --git a/src/groups/Cargo.toml b/src/groups/Cargo.toml index 0d0ff38f8..71cf5ac52 100644 --- a/src/groups/Cargo.toml +++ b/src/groups/Cargo.toml @@ -10,7 +10,6 @@ path = "groups.rs" [dependencies.uucore] path = "../uucore" -default-features = false features = ["entries"] [[bin]] diff --git a/src/id/Cargo.toml b/src/id/Cargo.toml index 1e2f863b7..784cbfa35 100644 --- a/src/id/Cargo.toml +++ b/src/id/Cargo.toml @@ -10,7 +10,6 @@ path = "id.rs" [dependencies.uucore] path = "../uucore" -default-features = false features = ["entries", "process"] [[bin]] diff --git a/src/kill/Cargo.toml b/src/kill/Cargo.toml index 41d91294f..8a530c685 100644 --- a/src/kill/Cargo.toml +++ b/src/kill/Cargo.toml @@ -10,7 +10,10 @@ path = "kill.rs" [dependencies] libc = "0.2.26" -uucore = { path="../uucore" } + +[dependencies.uucore] +path = "../uucore" +features = ["signals"] [[bin]] name = "kill" diff --git a/src/ls/Cargo.toml b/src/ls/Cargo.toml index fa6ecec1d..05fa01611 100644 --- a/src/ls/Cargo.toml +++ b/src/ls/Cargo.toml @@ -19,7 +19,6 @@ unicode-width = "0.1.4" [dependencies.uucore] path = "../uucore" -default-features = false features = ["entries"] [[bin]] diff --git a/src/nohup/Cargo.toml b/src/nohup/Cargo.toml index 6be2c707c..0fecd736d 100644 --- a/src/nohup/Cargo.toml +++ b/src/nohup/Cargo.toml @@ -11,7 +11,10 @@ path = "nohup.rs" [dependencies] getopts = "0.2.14" libc = "0.2.26" -uucore = { path="../uucore" } + +[dependencies.uucore] +path = "../uucore" +features = ["fs"] [[bin]] name = "nohup" diff --git a/src/pinky/Cargo.toml b/src/pinky/Cargo.toml index 7bd38dc77..2bac97232 100644 --- a/src/pinky/Cargo.toml +++ b/src/pinky/Cargo.toml @@ -10,7 +10,6 @@ path = "pinky.rs" [dependencies.uucore] path = "../uucore" -default-features = false features = ["utmpx", "entries"] [[bin]] diff --git a/src/readlink/Cargo.toml b/src/readlink/Cargo.toml index 42649257f..1e52942a0 100644 --- a/src/readlink/Cargo.toml +++ b/src/readlink/Cargo.toml @@ -11,7 +11,10 @@ path = "readlink.rs" [dependencies] getopts = "0.2.14" libc = "0.2.26" -uucore = { path="../uucore" } + +[dependencies.uucore] +path = "../uucore" +features = ["fs"] [[bin]] name = "readlink" diff --git a/src/realpath/Cargo.toml b/src/realpath/Cargo.toml index affac2f83..1d7b30130 100644 --- a/src/realpath/Cargo.toml +++ b/src/realpath/Cargo.toml @@ -10,7 +10,10 @@ path = "realpath.rs" [dependencies] getopts = "0.2.14" -uucore = { path="../uucore" } + +[dependencies.uucore] +path = "../uucore" +features = ["fs"] [[bin]] name = "realpath" diff --git a/src/relpath/Cargo.toml b/src/relpath/Cargo.toml index 402ac5888..69936f396 100644 --- a/src/relpath/Cargo.toml +++ b/src/relpath/Cargo.toml @@ -10,7 +10,10 @@ path = "relpath.rs" [dependencies] getopts = "0.2.14" -uucore = { path="../uucore" } + +[dependencies.uucore] +path = "../uucore" +features = ["fs"] [[bin]] name = "relpath" diff --git a/src/sleep/Cargo.toml b/src/sleep/Cargo.toml index ad196cf7c..e4a7b014c 100644 --- a/src/sleep/Cargo.toml +++ b/src/sleep/Cargo.toml @@ -10,7 +10,10 @@ path = "sleep.rs" [dependencies] getopts = "0.2.14" -uucore = { path="../uucore" } + +[dependencies.uucore] +path = "../uucore" +features = ["parse_time"] [[bin]] name = "sleep" diff --git a/src/sort/Cargo.toml b/src/sort/Cargo.toml index cb5985b76..fbf6870fc 100644 --- a/src/sort/Cargo.toml +++ b/src/sort/Cargo.toml @@ -12,7 +12,10 @@ path = "sort.rs" getopts = "0.2.14" semver = "0.7.0" itertools = "0.6.0" -uucore = { path="../uucore" } + +[dependencies.uucore] +path = "../uucore" +features = ["fs"] [[bin]] name = "sort" diff --git a/src/stat/Cargo.toml b/src/stat/Cargo.toml index 49c0cb641..bf66d2779 100644 --- a/src/stat/Cargo.toml +++ b/src/stat/Cargo.toml @@ -14,7 +14,6 @@ time = "0.1.38" [dependencies.uucore] path = "../uucore" -default-features = false features = ["entries"] [[bin]] diff --git a/src/sync/Cargo.toml b/src/sync/Cargo.toml index 22fcc2f82..b82b55999 100644 --- a/src/sync/Cargo.toml +++ b/src/sync/Cargo.toml @@ -13,7 +13,10 @@ getopts = "0.2.14" libc = "0.2.26" winapi = { version = "0.3", features = ["handleapi", "winerror"] } kernel32-sys = "0.2.2" -uucore = { path="../uucore" } + +[dependencies.uucore] +path = "../uucore" +features = ["wide"] [[bin]] name = "sync" diff --git a/src/timeout/Cargo.toml b/src/timeout/Cargo.toml index ae28ccc59..75ce9a289 100644 --- a/src/timeout/Cargo.toml +++ b/src/timeout/Cargo.toml @@ -12,7 +12,10 @@ path = "timeout.rs" getopts = "0.2.14" libc = "0.2.26" time = "0.1.38" -uucore = { path="../uucore" } + +[dependencies.uucore] +path = "../uucore" +features = ["parse_time", "process"] [[bin]] name = "timeout" diff --git a/src/touch/Cargo.toml b/src/touch/Cargo.toml index c7b8e4a26..90dcae2b3 100644 --- a/src/touch/Cargo.toml +++ b/src/touch/Cargo.toml @@ -15,7 +15,6 @@ time = "0.1.38" [dependencies.uucore] path = "../uucore" -default-features = false features = ["libc"] [[bin]] diff --git a/src/tr/Cargo.toml b/src/tr/Cargo.toml index 054fece62..2027fab87 100644 --- a/src/tr/Cargo.toml +++ b/src/tr/Cargo.toml @@ -12,10 +12,7 @@ path = "tr.rs" getopts = "0.2.14" bit-set = "0.4.0" fnv = "1.0.5" - -[dependencies.uucore] -path = "../uucore" -default-features = false +uucore = { path = "../uucore" } [[bin]] name = "tr" diff --git a/src/tty/Cargo.toml b/src/tty/Cargo.toml index 6fd2abd24..be18d0488 100644 --- a/src/tty/Cargo.toml +++ b/src/tty/Cargo.toml @@ -11,7 +11,10 @@ path = "tty.rs" [dependencies] getopts = "0.2.14" libc = "0.2.26" -uucore = { path="../uucore" } + +[dependencies.uucore] +path = "../uucore" +features = ["fs"] [[bin]] name = "tty" diff --git a/src/uname/Cargo.toml b/src/uname/Cargo.toml index c9cef3767..6498ad7bf 100644 --- a/src/uname/Cargo.toml +++ b/src/uname/Cargo.toml @@ -11,10 +11,7 @@ path = "uname.rs" [dependencies] clap = "2.20.0" platform-info = { git = "https://github.com/uutils/platform-info" } - -[dependencies.uucore] -path = "../uucore" -default-features = false +uucore = { path = "../uucore" } [[bin]] name = "uname" diff --git a/src/unexpand/Cargo.toml b/src/unexpand/Cargo.toml index 49bca8ba3..85d7d15b9 100644 --- a/src/unexpand/Cargo.toml +++ b/src/unexpand/Cargo.toml @@ -11,7 +11,10 @@ path = "unexpand.rs" [dependencies] getopts = "0.2.14" unicode-width = "0.1.4" -uucore = { path="../uucore" } + +[dependencies.uucore] +path = "../uucore" +features = ["utf8"] [[bin]] name = "unexpand" diff --git a/src/uniq/Cargo.toml b/src/uniq/Cargo.toml index 0ef73fc66..27ba4b672 100644 --- a/src/uniq/Cargo.toml +++ b/src/uniq/Cargo.toml @@ -10,10 +10,7 @@ path = "uniq.rs" [dependencies] getopts = "0.2.14" - -[dependencies.uucore] -path="../uucore" -default-features = false +uucore = { path = "../uucore" } [[bin]] name = "uniq" diff --git a/src/uptime/Cargo.toml b/src/uptime/Cargo.toml index 275050bbc..cb01f2b31 100644 --- a/src/uptime/Cargo.toml +++ b/src/uptime/Cargo.toml @@ -13,7 +13,6 @@ getopts = "0.2.14" [dependencies.uucore] path = "../uucore" -default-features = false features = ["utmpx"] [[bin]] diff --git a/src/users/Cargo.toml b/src/users/Cargo.toml index 007d23973..9513035c8 100644 --- a/src/users/Cargo.toml +++ b/src/users/Cargo.toml @@ -12,7 +12,6 @@ path = "users.rs" getopts = "0.2.14" [dependencies.uucore] -default-features = false features = ["utmpx"] path = "../uucore" diff --git a/src/uucore/Cargo.toml b/src/uucore/Cargo.toml index e1e56fed3..d18f834b3 100644 --- a/src/uucore/Cargo.toml +++ b/src/uucore/Cargo.toml @@ -20,7 +20,7 @@ process = ["libc"] signals = [] entries = ["libc"] wide = [] -default = ["fs", "libc", "utf8", "encoding", "parse_time", "mode", "utmpx", "process", "entries", "signals", "wide"] +default = [] [lib] path = "lib.rs" diff --git a/src/who/Cargo.toml b/src/who/Cargo.toml index 2275d67e2..51781a29f 100644 --- a/src/who/Cargo.toml +++ b/src/who/Cargo.toml @@ -10,7 +10,6 @@ path = "who.rs" [dependencies.uucore] path = "../uucore" -default-features = false features = ["utmpx"] [dependencies.clippy] diff --git a/src/whoami/Cargo.toml b/src/whoami/Cargo.toml index 66f6e4219..835e8569b 100644 --- a/src/whoami/Cargo.toml +++ b/src/whoami/Cargo.toml @@ -16,7 +16,6 @@ advapi32-sys = "0.2.0" [dependencies.uucore] path = "../uucore" -default-features = false features = ["entries", "wide"] [[bin]] diff --git a/src/yes/Cargo.toml b/src/yes/Cargo.toml index 76ae141f2..5c98a3e65 100644 --- a/src/yes/Cargo.toml +++ b/src/yes/Cargo.toml @@ -11,10 +11,7 @@ path = "yes.rs" [dependencies] clap = "2.31" - -[dependencies.uucore] -path = "../uucore" -default-features = false +uucore = { path = "../uucore" } [[bin]] name = "yes"