users: clap 3

This commit is contained in:
Terts Diepraam 2022-01-11 15:21:42 +01:00
parent ac76eefb99
commit e5a775be46
2 changed files with 4 additions and 4 deletions

View file

@ -15,7 +15,7 @@ edition = "2018"
path = "src/users.rs"
[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_procs = { version=">=0.0.7", package="uucore_procs", path="../../uucore_procs" }

View file

@ -36,7 +36,7 @@ pub fn uumain(args: impl uucore::Args) -> UResult<()> {
let after_help = get_long_usage();
let matches = uu_app()
.usage(&usage[..])
.override_usage(&usage[..])
.after_help(&after_help[..])
.get_matches_from(args);
@ -64,9 +64,9 @@ pub fn uumain(args: impl uucore::Args) -> UResult<()> {
Ok(())
}
pub fn uu_app() -> App<'static, 'static> {
pub fn uu_app<'a>() -> App<'a> {
App::new(uucore::util_name())
.version(crate_version!())
.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))
}