From b5ba2fc5ca13848f3a0d7fa672f142fc9f765613 Mon Sep 17 00:00:00 2001 From: Terts Diepraam Date: Tue, 11 Jan 2022 13:29:01 +0100 Subject: [PATCH] factor: clap 3 --- src/uu/factor/Cargo.toml | 2 +- src/uu/factor/src/cli.rs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/uu/factor/Cargo.toml b/src/uu/factor/Cargo.toml index 4e9403bc2..0bf4248ce 100644 --- a/src/uu/factor/Cargo.toml +++ b/src/uu/factor/Cargo.toml @@ -15,7 +15,7 @@ edition = "2018" num-traits = "0.2.13" # used in src/numerics.rs, which is included by build.rs [dependencies] -clap = { version = "2.33", features = ["wrap_help"] } +clap = { version = "3.0", features = ["wrap_help", "cargo"] } coz = { version = "0.1.3", optional = true } num-traits = "0.2.13" # Needs at least version 0.2.13 for "OverflowingAdd" rand = { version = "0.7", features = ["small_rng"] } diff --git a/src/uu/factor/src/cli.rs b/src/uu/factor/src/cli.rs index 0aa0b2474..653fbd404 100644 --- a/src/uu/factor/src/cli.rs +++ b/src/uu/factor/src/cli.rs @@ -77,9 +77,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(SUMMARY) - .arg(Arg::with_name(options::NUMBER).multiple(true)) + .arg(Arg::new(options::NUMBER).multiple_occurrences(true)) }