mirror of
https://github.com/clap-rs/clap
synced 2024-12-14 23:02:31 +00:00
Clearer error processing
This commit is contained in:
parent
8f4c26fc58
commit
c6bcfe819e
1 changed files with 34 additions and 35 deletions
|
@ -592,7 +592,7 @@ impl<'help, 'app> Parser<'help, 'app> {
|
|||
self.app.color(),
|
||||
));
|
||||
}
|
||||
} else {
|
||||
}
|
||||
let cands = suggestions::did_you_mean(
|
||||
&arg_os.to_string_lossy(),
|
||||
self.app.all_subcommand_names(),
|
||||
|
@ -627,7 +627,6 @@ impl<'help, 'app> Parser<'help, 'app> {
|
|||
self.app.color(),
|
||||
));
|
||||
}
|
||||
}
|
||||
return Err(ClapError::unknown_argument(
|
||||
arg_os.to_string_lossy().to_string(),
|
||||
None,
|
||||
|
|
Loading…
Reference in a new issue