1
Fork 0
mirror of https://github.com/RGBCube/uutils-coreutils synced 2025-07-27 11:07:44 +00:00

yes: update to clap 4

This commit is contained in:
Terts Diepraam 2022-10-01 12:26:21 +02:00
parent bfd310553d
commit d7b08a01b1
2 changed files with 4 additions and 4 deletions

View file

@ -15,7 +15,7 @@ edition = "2021"
path = "src/yes.rs"
[dependencies]
clap = { version = "3.2", features = ["wrap_help", "cargo"] }
clap = { version = "4.0", features = ["wrap_help", "cargo"] }
libc = "0.2.135"
uucore = { version=">=0.0.16", package="uucore", path="../../uucore", features=["pipes"] }

View file

@ -10,7 +10,7 @@
use std::borrow::Cow;
use std::io::{self, Result, Write};
use clap::{Arg, Command};
use clap::{Arg, ArgAction, Command};
use uucore::error::{UResult, USimpleError};
use uucore::format_usage;
@ -47,11 +47,11 @@ pub fn uumain(args: impl uucore::Args) -> UResult<()> {
}
}
pub fn uu_app<'a>() -> Command<'a> {
pub fn uu_app() -> Command {
Command::new(uucore::util_name())
.about(ABOUT)
.override_usage(format_usage(USAGE))
.arg(Arg::new("STRING").index(1).multiple_occurrences(true))
.arg(Arg::new("STRING").action(ArgAction::Append))
.infer_long_args(true)
}