[fuzz] Remove unnecessary allocation (#4689)
This resolves a comment @jameysharp made in a previous PR.
This commit is contained in:
@@ -47,8 +47,7 @@ impl<'a> SingleInstModule<'a> {
|
|||||||
|
|
||||||
// Encode the code section.
|
// Encode the code section.
|
||||||
let mut codes = CodeSection::new();
|
let mut codes = CodeSection::new();
|
||||||
let locals = vec![];
|
let mut f = Function::new([]);
|
||||||
let mut f = Function::new(locals);
|
|
||||||
for (index, _) in self.parameters.iter().enumerate() {
|
for (index, _) in self.parameters.iter().enumerate() {
|
||||||
f.instruction(&Instruction::LocalGet(index as u32));
|
f.instruction(&Instruction::LocalGet(index as u32));
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user