mirror of
https://github.com/clap-rs/clap
synced 2024-12-14 23:02:31 +00:00
Merge pull request #2346 from ldm0/non_fmt_panic_fix
Fix part of the non_fmt_panic warnings, bump version-sync to 0.9.2
This commit is contained in:
commit
a8c9d28ead
5 changed files with 6 additions and 4 deletions
|
@ -83,6 +83,7 @@ fn test_parse_hex() {
|
|||
let err = HexOpt::try_parse_from(&["test", "-n", "gg"]).unwrap_err();
|
||||
assert!(
|
||||
err.to_string().contains("invalid digit found in string"),
|
||||
"{}",
|
||||
err
|
||||
);
|
||||
}
|
||||
|
|
|
@ -149,6 +149,7 @@ fn test_parse_hex_function_path() {
|
|||
let err = HexOpt::try_parse_from(&["test", "-n", "gg"]).unwrap_err();
|
||||
assert!(
|
||||
err.to_string().contains("invalid digit found in string"),
|
||||
"{}",
|
||||
err
|
||||
);
|
||||
}
|
||||
|
|
|
@ -39,7 +39,7 @@ clap = { path = "../", version = "3.0.0-beta.2" }
|
|||
|
||||
[dev-dependencies]
|
||||
pretty_assertions = "0.6"
|
||||
version-sync = "0.8"
|
||||
version-sync = "0.9"
|
||||
|
||||
[features]
|
||||
default = []
|
||||
|
|
|
@ -2317,11 +2317,11 @@ impl<'help> App<'help> {
|
|||
.collect();
|
||||
|
||||
if !args_missing_help.is_empty() {
|
||||
panic!(format!(
|
||||
panic!(
|
||||
"AppSettings::HelpRequired is enabled for the App {}, but at least one of its arguments does not have either `help` or `long_help` set. List of such arguments: {}",
|
||||
self.name,
|
||||
args_missing_help.join(", ")
|
||||
));
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -242,7 +242,7 @@ impl<'help, 'app, 'parser> Validator<'help, 'app, 'parser> {
|
|||
));
|
||||
}
|
||||
|
||||
panic!(INTERNAL_ERROR_MSG);
|
||||
panic!("{}", INTERNAL_ERROR_MSG);
|
||||
}
|
||||
|
||||
fn validate_conflicts(&mut self, matcher: &mut ArgMatcher) -> ClapResult<()> {
|
||||
|
|
Loading…
Reference in a new issue