mirror of
https://github.com/clap-rs/clap
synced 2024-12-14 14:52:33 +00:00
Fixed positionals tests
This commit is contained in:
parent
b48ef85ece
commit
632f745578
1 changed files with 1 additions and 1 deletions
|
@ -242,7 +242,7 @@ where
|
|||
// Check that if a required positional argument is found, all positions with a lower
|
||||
// index are also required
|
||||
let mut found = false;
|
||||
for p in positionals!(self.app) {
|
||||
for p in (1..=num_p).rev().filter_map(|n| self.app.args.get(KeyType::Position(n as u64))) {
|
||||
if found {
|
||||
assert!(
|
||||
p.is_set(ArgSettings::Required),
|
||||
|
|
Loading…
Reference in a new issue