fix: fixes an intentional panic issue discovered via clippy

This commit is contained in:
Kevin K 2016-01-03 21:54:56 -05:00
parent 4e3bd16679
commit ea83a3d421
2 changed files with 2 additions and 2 deletions

View file

@ -17,7 +17,7 @@ vec_map = "0.4"
ansi_term = { version = "~0.7", optional = true }
strsim = { version = "~0.4.0", optional = true }
yaml-rust = { version = "~0.2.2", optional = true }
clippy = { version = "~0.0.29", optional = true }
clippy = { version = "~0.0.35", optional = true }
[features]
default = ["suggestions", "color"]

View file

@ -83,7 +83,7 @@ impl<'n, 'a> From<&'a Arg<'n, 'n, 'n, 'n, 'n, 'n>> for FlagBuilder<'n> {
fn from(a: &Arg<'n, 'n, 'n, 'n, 'n, 'n>) -> Self {
if a.validator.is_some() {
panic!("The argument '{}' has a validator set, yet was parsed as a flag. Ensure \
.takes_value(true) or .index(u8) is set.")
.takes_value(true) or .index(u8) is set.", a.name)
}
if !a.empty_vals {
// Empty vals defaults to true, so if it's false it was manually set