From e62fdb9307d2abd2bb4915995515b636748ae803 Mon Sep 17 00:00:00 2001 From: Terts Diepraam Date: Tue, 11 Jan 2022 15:23:19 +0100 Subject: [PATCH] yes: clap 3 --- src/uu/yes/Cargo.toml | 2 +- src/uu/yes/src/yes.rs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/uu/yes/Cargo.toml b/src/uu/yes/Cargo.toml index 7c2b43329..b5eaa0ad6 100644 --- a/src/uu/yes/Cargo.toml +++ b/src/uu/yes/Cargo.toml @@ -15,7 +15,7 @@ edition = "2018" path = "src/yes.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=["pipes"] } uucore_procs = { version=">=0.0.7", package="uucore_procs", path="../../uucore_procs" } diff --git a/src/uu/yes/src/yes.rs b/src/uu/yes/src/yes.rs index bbedc0af1..51701214a 100644 --- a/src/uu/yes/src/yes.rs +++ b/src/uu/yes/src/yes.rs @@ -46,8 +46,8 @@ pub fn uumain(args: impl uucore::Args) -> UResult<()> { } } -pub fn uu_app() -> App<'static, 'static> { - app_from_crate!().arg(Arg::with_name("STRING").index(1).multiple(true)) +pub fn uu_app<'a>() -> App<'a> { + app_from_crate!().arg(Arg::new("STRING").index(1).multiple_occurrences(true)) } fn prepare_buffer<'a>(input: &'a str, buffer: &'a mut [u8; BUF_SIZE]) -> &'a [u8] {