Address all clippy lints

These changes do not change the behaviour of the
code and should be non-controversial.
This commit is contained in:
Alexander Theißen
2020-10-13 13:44:05 +02:00
parent f59eb121e5
commit c09a924a81
18 changed files with 249 additions and 256 deletions
+1 -3
View File
@@ -22,9 +22,8 @@ pub fn export_mutable_globals(
module.sections_mut().push(elements::Section::Export(elements::ExportSection::default()));
}
let mut symbol_index = 0usize;
let prefix: String = prefix.into();
for export in exports {
for (symbol_index, export) in exports.into_iter().enumerate() {
let new_entry = elements::ExportEntry::new(
format!("{}_{}", prefix, symbol_index),
elements::Internal::Global(
@@ -35,7 +34,6 @@ pub fn export_mutable_globals(
.expect("added above if does not exists")
.entries_mut()
.push(new_entry);
symbol_index += 1;
}
}