update everything to use Entry defaults
This commit is contained in:
parent
1c35953cf8
commit
93cdf1f278
12 changed files with 24 additions and 84 deletions
|
@ -352,9 +352,7 @@ fn parse_externs(matches: &getopts::Matches) -> Result<core::Externs, String> {
|
|||
}
|
||||
};
|
||||
let name = name.to_string();
|
||||
let locs = externs.entry(name).get().unwrap_or_else(
|
||||
|vacant_entry| vacant_entry.insert(Vec::with_capacity(1)));
|
||||
locs.push(location.to_string());
|
||||
externs.entry(name).default(vec![]).push(location.to_string());
|
||||
}
|
||||
Ok(externs)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue