diff --git a/src/graph.rs b/src/graph.rs index a37a082..bfb0838 100644 --- a/src/graph.rs +++ b/src/graph.rs @@ -853,9 +853,9 @@ mod tests { let rtype = &**rfunc.type_ref.read(); let elements::Type::Function(ref ftype) = rtype; - /// import deleted so now it's func #0 + // import deleted so now it's func #0 assert_eq!(rfunc.order(), Some(0)); - /// type should be the same, #1 + // type should be the same, #1 assert_eq!(ftype.params().len(), 1); } } @@ -981,4 +981,4 @@ mod tests { "Call should be recalculated to 1" ); } -} \ No newline at end of file +} diff --git a/src/ref_list.rs b/src/ref_list.rs index f33e882..9e281cc 100644 --- a/src/ref_list.rs +++ b/src/ref_list.rs @@ -196,7 +196,7 @@ impl RefList { } fn done_delete(&mut self, indices: &[usize]) { - for mut entry in self.items.iter_mut() { + for entry in self.items.iter_mut() { let mut entry = entry.write(); let total_less = indices.iter() .take_while(|x| **x < entry.order().expect("Items in the list always have order; qed")) @@ -209,7 +209,7 @@ impl RefList { let mut total_removed = 0; for idx in indices { - let mut detached = self.items.remove(*idx - total_removed); + let detached = self.items.remove(*idx - total_removed); detached.write().index = EntryOrigin::Detached; total_removed += 1; } @@ -559,4 +559,4 @@ mod tests { assert_eq!(item50.order(), Some(6)); assert_eq!(item60.order(), Some(7)); } -} \ No newline at end of file +} diff --git a/src/stack_height/mod.rs b/src/stack_height/mod.rs index 6674717..0f53394 100644 --- a/src/stack_height/mod.rs +++ b/src/stack_height/mod.rs @@ -214,7 +214,7 @@ fn instrument_functions(ctx: &mut Context, module: &mut elements::Module) -> Res for section in module.sections_mut() { if let elements::Section::Code(ref mut code_section) = *section { for func_body in code_section.bodies_mut() { - let mut opcodes = func_body.code_mut(); + let opcodes = func_body.code_mut(); instrument_function(ctx, opcodes)?; } }