imp(CLI): disallow empty values explicitly

[skip ci]
This commit is contained in:
Sebastian Thiel
2015-05-18 10:19:32 +02:00
parent b858286f6e
commit 129fd38e00
2 changed files with 3 additions and 2 deletions

View File

@@ -30,4 +30,4 @@ cargo:
- yup-hyper-mock = "*"
- serde = ">= 0.3.0"
- serde_macros = "*"
- clap = "*"
- clap = ">= 0.9.1"

View File

@@ -272,7 +272,8 @@ for &(main_command_name, ref about, ref subcommands) in arg_data.iter() {
(_ , &Some(f)) => f,
_ => unreachable!(),
};
let mut arg = Arg::with_name(arg_name_str);
let mut arg = Arg::with_name(arg_name_str)
.empty_values(false);
if let &Some(short_flag) = flag {
arg = arg.short(short_flag);
}