rollup merge of #20653: alexcrichton/entry-unstable

There's been some debate over the precise form that these APIs should take, and
they've undergone some changes recently, so these APIs are going to be left
unstable for now to be fleshed out during the next release cycle.
This commit is contained in:
Alex Crichton
2015-01-06 15:29:18 -08:00
18 changed files with 77 additions and 90 deletions

View File

@@ -317,7 +317,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(
let locs = externs.entry(name).get().unwrap_or_else(
|vacant_entry| vacant_entry.insert(Vec::with_capacity(1)));
locs.push(location.to_string());
}