From c4fd6a95da582a4a21802d981062c9202746ef19 Mon Sep 17 00:00:00 2001 From: Andrew Brown Date: Thu, 11 Aug 2022 12:26:33 -0700 Subject: [PATCH] [fuzz] Remove unnecessary allocation (#4689) This resolves a comment @jameysharp made in a previous PR. --- crates/fuzzing/src/generators/single_inst_module.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/crates/fuzzing/src/generators/single_inst_module.rs b/crates/fuzzing/src/generators/single_inst_module.rs index 5f619ca16a..fda2518359 100644 --- a/crates/fuzzing/src/generators/single_inst_module.rs +++ b/crates/fuzzing/src/generators/single_inst_module.rs @@ -47,8 +47,7 @@ impl<'a> SingleInstModule<'a> { // Encode the code section. let mut codes = CodeSection::new(); - let locals = vec![]; - let mut f = Function::new(locals); + let mut f = Function::new([]); for (index, _) in self.parameters.iter().enumerate() { f.instruction(&Instruction::LocalGet(index as u32)); }