Skip to content

Commit 7c38aa8

Browse files
Koenraad VerheydenJoshua Nelson
authored andcommitted
Remove .index(1) from Arg
From clap::Arg::index documentation: > NOTE: If no Arg::short, or Arg::long have been defined, you can > optionally leave off the index method, and the index will be assigned > in order of evaluation. Utilizing the index method allows for setting > indexes out of order
1 parent 7f75098 commit 7c38aa8

File tree

1 file changed

+0
-2
lines changed

1 file changed

+0
-2
lines changed

src/bin/cratesfyi.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,13 +83,11 @@ pub fn main() {
8383
.subcommand(SubCommand::with_name("add")
8484
.about("Add a crate to the blacklist")
8585
.arg(Arg::with_name("CRATE_NAME")
86-
.index(1)
8786
.required(true)
8887
.help("Crate name")))
8988
.subcommand(SubCommand::with_name("remove")
9089
.about("Remove a crate from the blacklist")
9190
.arg(Arg::with_name("CRATE_NAME")
92-
.index(1)
9391
.required(true)
9492
.help("Crate name"))))
9593
.subcommand(SubCommand::with_name("start-web-server")

0 commit comments

Comments
 (0)