Skip to content

Commit

Permalink
Reorder flags in help to give bin context
Browse files Browse the repository at this point in the history
It's not clear that bin is a singular of bins rather than the opposite of lib
  • Loading branch information
kornelski committed May 18, 2023
1 parent 76705ed commit 75a1dd0
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/cargo/util/command_prelude.rs
Original file line number Diff line number Diff line change
Expand Up @@ -91,10 +91,10 @@ pub trait CommandExt: Sized {
all: &'static str,
) -> Self {
self.arg_targets_lib_bin_example(lib, bin, bins, example, examples)
._arg(optional_multi_opt("test", "NAME", test))
._arg(flag("tests", tests))
._arg(optional_multi_opt("bench", "NAME", bench))
._arg(optional_multi_opt("test", "NAME", test))
._arg(flag("benches", benches))
._arg(optional_multi_opt("bench", "NAME", bench))
._arg(flag("all-targets", all))
}

Expand All @@ -107,10 +107,10 @@ pub trait CommandExt: Sized {
examples: &'static str,
) -> Self {
self._arg(flag("lib", lib))
._arg(optional_multi_opt("bin", "NAME", bin))
._arg(flag("bins", bins))
._arg(optional_multi_opt("example", "NAME", example))
._arg(optional_multi_opt("bin", "NAME", bin))
._arg(flag("examples", examples))
._arg(optional_multi_opt("example", "NAME", example))
}

fn arg_targets_bins_examples(
Expand Down

0 comments on commit 75a1dd0

Please sign in to comment.