Auto merge of #441 - kbknapp:vecmap-update, r=kbknapp

Update VecMap to 0.6

@alexbool

This is the new PR for your commit - no further action required, all rebasing is good!
This commit is contained in:
Homu 2016-03-09 08:12:42 +09:00
commit e2c104c8c5
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,9 +1172,9 @@ 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()
.last()
.expect(INTERNAL_ERROR_MSG))
ma.vals.get(ma.vals.keys()
.last()
.expect(INTERNAL_ERROR_MSG))
.expect(INTERNAL_ERROR_MSG).to_str().expect(INVALID_UTF8),
a,
&*self.create_current_usage(matcher)));