Remove some calls to clone() by using into_iter().

This commit is contained in:
Nick Lewycky
2020-05-15 17:24:56 -07:00
parent fce8e32cf6
commit aa4aa65d0c
2 changed files with 5 additions and 8 deletions

View File

@ -490,9 +490,8 @@ impl FuncTranslator {
.collect::<Vec<_>>();
custom_sections.sort_unstable_by_key(|a| a.0);
let custom_sections = custom_sections
.iter()
// TODO: remove usage of clone
.map(|(k, v)| v.clone())
.into_iter()
.map(|(k, v)| v)
.collect::<PrimaryMap<SectionIndex, _>>();
let function_body = FunctionBody {