mirror of
https://github.com/uutils/coreutils.git
synced 2026-06-10 15:48:22 -07:00
yes: update to clap 4
This commit is contained in:
@@ -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"] }
|
||||
|
||||
|
||||
@@ -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)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user