diff --git a/lib/jit/src/compiler.rs b/lib/jit/src/compiler.rs index b781271263..62d73a40f2 100644 --- a/lib/jit/src/compiler.rs +++ b/lib/jit/src/compiler.rs @@ -74,7 +74,7 @@ impl Compiler { SetupError, > { let (compilation, relocations) = - cranelift::compile_module(&module, function_body_inputs, &*self.isa) + cranelift::compile_module(module, function_body_inputs, &*self.isa) .map_err(SetupError::Compile)?; let allocated_functions = diff --git a/lib/jit/src/link.rs b/lib/jit/src/link.rs index 596c27846c..9efdcc1f62 100644 --- a/lib/jit/src/link.rs +++ b/lib/jit/src/link.rs @@ -183,7 +183,7 @@ pub fn link_module( } // Apply relocations, now that we have virtual addresses for everything. - relocate(allocated_functions, relocations, &module); + relocate(allocated_functions, relocations, module); Ok(Imports::new( function_imports, diff --git a/lib/jit/src/namespace.rs b/lib/jit/src/namespace.rs index f4a0c004b5..5d7e0730ab 100644 --- a/lib/jit/src/namespace.rs +++ b/lib/jit/src/namespace.rs @@ -65,7 +65,7 @@ impl Namespace { field_name: &str, args: &[RuntimeValue], ) -> Result { - invoke(compiler, &mut self.instances[index], &field_name, &args) + invoke(compiler, &mut self.instances[index], field_name, args) } /// Get a slice of memory from an instance. @@ -76,12 +76,12 @@ impl Namespace { start: usize, len: usize, ) -> Result<&[u8], ActionError> { - inspect_memory(&self.instances[index], &field_name, start, len) + inspect_memory(&self.instances[index], field_name, start, len) } /// Get the value of an exported global from an instance. pub fn get(&self, index: InstanceIndex, field_name: &str) -> Result { - get(&self.instances[index], &field_name) + get(&self.instances[index], field_name) } } diff --git a/lib/runtime/src/instance.rs b/lib/runtime/src/instance.rs index e877200c20..2c4c796e0f 100644 --- a/lib/runtime/src/instance.rs +++ b/lib/runtime/src/instance.rs @@ -570,7 +570,7 @@ impl Instance { /// Return a reference to the vmctx used by compiled wasm code. pub fn vmctx(&self) -> &VMContext { - &self.mmap_field.contents().vmctx() + self.mmap_field.contents().vmctx() } /// Return a raw pointer to the vmctx used by compiled wasm code. @@ -818,7 +818,7 @@ fn create_memories( let mut memories: PrimaryMap = PrimaryMap::with_capacity(module.memory_plans.len() - num_imports); for plan in &module.memory_plans.values().as_slice()[num_imports..] { - memories.push(LinearMemory::new(&plan).map_err(InstantiationError::Resource)?); + memories.push(LinearMemory::new(plan).map_err(InstantiationError::Resource)?); } Ok(memories.into_boxed_slice()) } diff --git a/lib/wast/src/wast.rs b/lib/wast/src/wast.rs index b08dddc341..fe3db40eaf 100644 --- a/lib/wast/src/wast.rs +++ b/lib/wast/src/wast.rs @@ -193,7 +193,7 @@ impl WastContext { .collect::>(); let index = self.get_index(&instance_name)?; self.namespace - .invoke(&mut *self.compiler, index, &field, &value_args) + .invoke(&mut *self.compiler, index, field, &value_args) .map_err(WastError::Action) } diff --git a/src/wasmtime.rs b/src/wasmtime.rs index 7a4b9fc017..839b149120 100644 --- a/src/wasmtime.rs +++ b/src/wasmtime.rs @@ -168,7 +168,7 @@ fn handle_module( // If a function to invoke was given, invoke it. if let Some(ref f) = args.flag_invoke { match namespace - .invoke(compiler, index, &f, &[]) + .invoke(compiler, index, f, &[]) .map_err(|e| e.to_string())? { ActionOutcome::Returned { .. } => {}