diff --git a/src/uu/relpath/Cargo.toml b/src/uu/relpath/Cargo.toml index 867d9a7d9..0af624c4f 100644 --- a/src/uu/relpath/Cargo.toml +++ b/src/uu/relpath/Cargo.toml @@ -15,7 +15,7 @@ edition = "2021" path = "src/relpath.rs" [dependencies] -clap = { version = "3.2", features = ["wrap_help", "cargo"] } +clap = { version = "4.0", features = ["wrap_help", "cargo"] } uucore = { version=">=0.0.16", package="uucore", path="../../uucore", features=["fs"] } [[bin]] diff --git a/src/uu/relpath/src/relpath.rs b/src/uu/relpath/src/relpath.rs index 0ba1c86f4..522cc54e5 100644 --- a/src/uu/relpath/src/relpath.rs +++ b/src/uu/relpath/src/relpath.rs @@ -76,24 +76,15 @@ pub fn uumain(args: impl uucore::Args) -> UResult<()> { println_verbatim(result).map_err_context(String::new) } -pub fn uu_app<'a>() -> Command<'a> { +pub fn uu_app() -> Command { Command::new(uucore::util_name()) .version(crate_version!()) .about(ABOUT) .override_usage(format_usage(USAGE)) .infer_long_args(true) - .arg(Arg::new(options::DIR).short('d').takes_value(true).help( + .arg(Arg::new(options::DIR).short('d').help( "If any of FROM and TO is not subpath of DIR, output absolute path instead of relative", )) - .arg( - Arg::new(options::TO) - .required(true) - .takes_value(true) - .value_hint(clap::ValueHint::AnyPath), - ) - .arg( - Arg::new(options::FROM) - .takes_value(true) - .value_hint(clap::ValueHint::AnyPath), - ) + .arg(Arg::new(options::TO).value_hint(clap::ValueHint::AnyPath)) + .arg(Arg::new(options::FROM).value_hint(clap::ValueHint::AnyPath)) }