From 3e8235469d4c58d4bb4ba2ed22431c192ac673f4 Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Thu, 15 Jun 2023 20:09:15 +0100 Subject: [PATCH] clap: Use ArgAction::Append Gets rid of this 3 to 4 deprecation warning. The warning's suggestion to use "multiple_occurrences" seems wrong since that is also deprecated ?! It links to Arg::action, and emprically this construction DTRT. warning: use of deprecated method `clap::Arg::<'help>::multiple`: Split into `Arg::multiple_occurrences` (most likely what you want) and `Arg::multiple_values` --> src/config.rs:89:16 | 89 | #[clap(long, multiple=true, number_of_values=1)] | ^^^^^^^^ | = note: `#[warn(deprecated)]` on by default Signed-off-by: Ian Jackson --- src/config.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/config.rs b/src/config.rs index 538bce2..728a04b 100644 --- a/src/config.rs +++ b/src/config.rs @@ -86,7 +86,7 @@ pub struct Opts { pub config: PathBuf, /// Additional config files or dirs, which can override the others - #[clap(long, multiple=true, number_of_values=1)] + #[clap(long, action=clap::ArgAction::Append)] pub extra_config: Vec, } -- 2.30.2