mirror of
https://github.com/clap-rs/clap
synced 2024-11-10 06:44:16 +00:00
chore: changing unrequired to non-required
This commit is contained in:
parent
1b4a4596f6
commit
a97e24630d
2 changed files with 3 additions and 3 deletions
|
@ -220,7 +220,7 @@ impl<'help, 'app> Parser<'help, 'app> {
|
|||
if foundx2 && !p.is_set(ArgSettings::Required) {
|
||||
assert!(
|
||||
p.is_set(ArgSettings::Required),
|
||||
"Found unrequired positional argument with a lower \
|
||||
"Found non-required positional argument with a lower \
|
||||
index than a required positional argument by two or more: {:?} \
|
||||
index {:?}",
|
||||
p.name,
|
||||
|
@ -254,7 +254,7 @@ impl<'help, 'app> Parser<'help, 'app> {
|
|||
if found {
|
||||
assert!(
|
||||
p.is_set(ArgSettings::Required),
|
||||
"Found unrequired positional argument with a lower \
|
||||
"Found non-required positional argument with a lower \
|
||||
index than a required positional argument: {:?} index {:?}",
|
||||
p.name,
|
||||
p.index
|
||||
|
|
|
@ -217,7 +217,7 @@ fn single_positional_required_usage_string() {
|
|||
// This tests a programmer error and will only succeed with debug_assertions
|
||||
#[cfg(debug_assertions)]
|
||||
#[test]
|
||||
#[should_panic = "Found unrequired positional argument \
|
||||
#[should_panic = "Found non-required positional argument \
|
||||
with a lower index than a required positional argument"]
|
||||
fn missing_required() {
|
||||
let _ = App::new("test")
|
||||
|
|
Loading…
Reference in a new issue