From 239f422203306b1423d29322067ab133e4e106dd Mon Sep 17 00:00:00 2001 From: Rob Bradford Date: Tue, 22 Aug 2023 10:45:14 +0100 Subject: [PATCH] hypervisor: x86: emulator: Remove unncessary mut from reference warning: this argument is a mutable reference, but not used mutably --> hypervisor/src/arch/x86/emulator/instructions/mod.rs:22:15 | 22 | platform: &mut dyn PlatformEmulator, | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider changing to: `&dyn PlatformEmulator` | = note: this is cfg-gated and may require further changes = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_pass_by_ref_mut Signed-off-by: Rob Bradford --- hypervisor/src/arch/x86/emulator/instructions/mod.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hypervisor/src/arch/x86/emulator/instructions/mod.rs b/hypervisor/src/arch/x86/emulator/instructions/mod.rs index 3fac495ce..72b97acfb 100644 --- a/hypervisor/src/arch/x86/emulator/instructions/mod.rs +++ b/hypervisor/src/arch/x86/emulator/instructions/mod.rs @@ -18,8 +18,8 @@ fn get_op( insn: &Instruction, op_index: u32, op_size: usize, - state: &mut T, - platform: &mut dyn PlatformEmulator, + state: &T, + platform: &dyn PlatformEmulator, ) -> Result { if insn.op_count() < op_index + 1 { return Err(PlatformError::InvalidOperand(anyhow!(