mirror of
https://github.com/uutils/coreutils
synced 2025-01-05 17:59:00 +00:00
users: clap 3
This commit is contained in:
parent
ac76eefb99
commit
e5a775be46
2 changed files with 4 additions and 4 deletions
|
@ -15,7 +15,7 @@ edition = "2018"
|
||||||
path = "src/users.rs"
|
path = "src/users.rs"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
clap = { version = "2.33", features = ["wrap_help"] }
|
clap = { version = "3.0", features = ["wrap_help", "cargo"] }
|
||||||
uucore = { version=">=0.0.10", package="uucore", path="../../uucore", features=["utmpx"] }
|
uucore = { version=">=0.0.10", package="uucore", path="../../uucore", features=["utmpx"] }
|
||||||
uucore_procs = { version=">=0.0.7", package="uucore_procs", path="../../uucore_procs" }
|
uucore_procs = { version=">=0.0.7", package="uucore_procs", path="../../uucore_procs" }
|
||||||
|
|
||||||
|
|
|
@ -36,7 +36,7 @@ pub fn uumain(args: impl uucore::Args) -> UResult<()> {
|
||||||
let after_help = get_long_usage();
|
let after_help = get_long_usage();
|
||||||
|
|
||||||
let matches = uu_app()
|
let matches = uu_app()
|
||||||
.usage(&usage[..])
|
.override_usage(&usage[..])
|
||||||
.after_help(&after_help[..])
|
.after_help(&after_help[..])
|
||||||
.get_matches_from(args);
|
.get_matches_from(args);
|
||||||
|
|
||||||
|
@ -64,9 +64,9 @@ pub fn uumain(args: impl uucore::Args) -> UResult<()> {
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn uu_app() -> App<'static, 'static> {
|
pub fn uu_app<'a>() -> App<'a> {
|
||||||
App::new(uucore::util_name())
|
App::new(uucore::util_name())
|
||||||
.version(crate_version!())
|
.version(crate_version!())
|
||||||
.about(ABOUT)
|
.about(ABOUT)
|
||||||
.arg(Arg::with_name(ARG_FILES).takes_value(true).max_values(1))
|
.arg(Arg::new(ARG_FILES).takes_value(true).max_values(1))
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue