Tidy up unneeded '&'s.

This commit is contained in:
Dan Gohman
2019-01-03 11:31:36 -08:00
parent c66a3c23f3
commit 529de7ca60
6 changed files with 9 additions and 9 deletions

View File

@@ -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 =

View File

@@ -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,

View File

@@ -65,7 +65,7 @@ impl Namespace {
field_name: &str,
args: &[RuntimeValue],
) -> Result<ActionOutcome, ActionError> {
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<RuntimeValue, ActionError> {
get(&self.instances[index], &field_name)
get(&self.instances[index], field_name)
}
}