diff --git a/lib/wasm/src/code_translator.rs b/lib/wasm/src/code_translator.rs index 5d7e59f829..f08df8b0e1 100644 --- a/lib/wasm/src/code_translator.rs +++ b/lib/wasm/src/code_translator.rs @@ -38,7 +38,7 @@ use std::{i32, u32}; /// Translates wasm operators into Cretonne IL instructions. Returns `true` if it inserted /// a return. pub fn translate_operator( - op: &Operator, + op: Operator, builder: &mut FunctionBuilder, state: &mut TranslationState, environ: &mut FE, @@ -48,7 +48,7 @@ pub fn translate_operator( } // This big match treats all Wasm code operators. - match *op { + match op { /********************************** Locals **************************************** * `get_local` and `set_local` are treated as non-SSA variables and will completely * disappear in the Cretonne Code @@ -265,7 +265,7 @@ pub fn translate_operator( state.peekn(return_count), ); } - Operator::BrTable { ref table } => { + Operator::BrTable { table } => { let (depths, default) = table.read_table(); let mut min_depth = default; for depth in &depths { @@ -935,11 +935,11 @@ pub fn translate_operator( /// are dropped but special ones like `End` or `Else` signal the potential end of the unreachable /// portion so the translation state muts be updated accordingly. fn translate_unreachable_operator( - op: &Operator, + op: Operator, builder: &mut FunctionBuilder, state: &mut TranslationState, ) { - match *op { + match op { Operator::If { ty: _ } => { // Push a placeholder control stack entry. The if isn't reachable, // so we don't have any branches anywhere. diff --git a/lib/wasm/src/func_translator.rs b/lib/wasm/src/func_translator.rs index 7e8955e816..d5737bd446 100644 --- a/lib/wasm/src/func_translator.rs +++ b/lib/wasm/src/func_translator.rs @@ -198,7 +198,7 @@ fn parse_function_body( while !state.control_stack.is_empty() { builder.set_srcloc(cur_srcloc(&reader)); let op = reader.read_operator().map_err(|_| CtonError::InvalidInput)?; - translate_operator(&op, builder, state, environ); + translate_operator(op, builder, state, environ); } // The final `End` operator left us in the exit block where we need to manually add a return