fix(error): Include 'Usage:' title in --flag=bad-value error

This commit is contained in:
Ed Page 2022-09-27 09:20:42 -05:00
parent 3a8d2a579b
commit 12d76d649a
2 changed files with 2 additions and 2 deletions

View file

@ -183,7 +183,7 @@ impl<'cmd> Parser<'cmd> {
self.cmd,
rest,
arg,
Usage::new(self.cmd).create_usage_no_title(&used),
Usage::new(self.cmd).create_usage_with_title(&used),
));
}
ParseResult::MaybeHyphenValue => {

View file

@ -142,7 +142,7 @@ fn unexpected_value_error() {
const USE_FLAG_AS_ARGUMENT: &str = "\
error: The value 'foo' was provided to '--a-flag' but it wasn't expecting any more values
mycat [OPTIONS] [filename]
Usage: mycat [OPTIONS] [filename]
For more information try '--help'
";