Update VecMap to 0.6

This commit is contained in:
Alexander Bulaev 2016-03-04 21:42:22 +03:00 committed by Kevin K
parent 87441b5f76
commit 150784ae20
2 changed files with 6 additions and 6 deletions

View file

@ -13,7 +13,7 @@ keywords = ["argument", "command", "arg", "parser", "parse"]
[dependencies]
bitflags = "~0.4"
vec_map = "~0.4"
vec_map = "~0.6"
ansi_term = { version = "~0.7.2", optional = true }
strsim = { version = "~0.4.0", optional = true }
yaml-rust = { version = "~0.3", optional = true }

View file

@ -147,7 +147,7 @@ impl<'a, 'b> Parser<'a, 'b> where 'a: 'b {
} else {
a.index.unwrap() as usize
};
assert!(!self.positionals.contains_key(&i),
assert!(!self.positionals.contains_key(i),
format!("Argument \"{}\" has the same index as another positional \
argument\n\n\tPerhaps try .multiple(true) to allow one positional argument \
to take multiple values", a.name));
@ -479,7 +479,7 @@ impl<'a, 'b> Parser<'a, 'b> where 'a: 'b {
}
}
if let Some(p) = self.positionals.get(&pos_counter) {
if let Some(p) = self.positionals.get(pos_counter) {
parse_positional!(self, p, arg_os, pos_only, pos_counter, matcher);
} else {
if self.settings.is_set(AppSettings::AllowExternalSubcommands) {
@ -1172,7 +1172,7 @@ impl<'a, 'b> Parser<'a, 'b> where 'a: 'b {
if (ma.vals.len() as u64) > num {
debugln!("Sending error TooManyValues");
return Err(Error::too_many_values(
ma.vals.get(&ma.vals.keys()
ma.vals.get(ma.vals.keys()
.last()
.expect(INTERNAL_ERROR_MSG))
.expect(INTERNAL_ERROR_MSG).to_str().expect(INVALID_UTF8),