Skip to content

Commit be94461

Browse files
committed
clap: Remove #[arg(value_parser)] which is now the default
Fixes these warnings when running `cargo check --features clap/deprecated`: warning: use of deprecated function `<Opts as clap::Args>::augment_args::bare_value_parser`: `#[arg(value_parser)]` is now the default and is no longer needed` --> src/main.rs:146:9 | 146 | value_parser | ^^^^^^^^^^^^ | = note: `#[warn(deprecated)]` on by default warning: use of deprecated function `<Opts as clap::Args>::augment_args::bare_value_parser`: `#[arg(value_parser)]` is now the default and is no longer needed` --> src/main.rs:179:9 | 179 | value_parser | ^^^^^^^^^^^^
1 parent 188c766 commit be94461

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

src/main.rs

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -142,8 +142,7 @@ struct Opts {
142142
#[arg(
143143
help = "Arguments to pass to cargo or the file specified by --script during tests",
144144
num_args = 1..,
145-
last = true,
146-
value_parser
145+
last = true
147146
)]
148147
command_args: Vec<OsString>,
149148

@@ -173,11 +172,7 @@ a date (YYYY-MM-DD), git tag name (e.g. 1.58.0) or git commit SHA."
173172
#[arg(long, help = "Force installation over existing artifacts")]
174173
force_install: bool,
175174

176-
#[arg(
177-
long,
178-
help = "Script replacement for `cargo build` command",
179-
value_parser
180-
)]
175+
#[arg(long, help = "Script replacement for `cargo build` command")]
181176
script: Option<PathBuf>,
182177

183178
#[arg(long, help = "Do not install cargo [default: install cargo]")]

0 commit comments

Comments
 (0)