From c721c0d88fa877aee4de60c79fafd8bd29f50b4d Mon Sep 17 00:00:00 2001 From: Rob Bradford Date: Tue, 19 Mar 2024 17:17:37 +0000 Subject: [PATCH] hypervisor: emulator: Remove unnecessary #![allow(unused_mut)] clippy was flagging this up as a mixture of mixed attributes but that attribute is no longer necessary warning: item has both inner and outer attributes --> hypervisor/src/arch/x86/emulator/mod.rs:769:1 | 769 | / #[cfg(test)] 770 | | mod tests { 771 | | #![allow(unused_mut)] | |_________________________^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#mixed_attributes_style = note: `#[warn(clippy::mixed_attributes_style)]` on by default Signed-off-by: Rob Bradford --- hypervisor/src/arch/x86/emulator/instructions/cmp.rs | 2 -- hypervisor/src/arch/x86/emulator/instructions/mov.rs | 1 - hypervisor/src/arch/x86/emulator/instructions/movs.rs | 1 - hypervisor/src/arch/x86/emulator/instructions/or.rs | 1 - hypervisor/src/arch/x86/emulator/mod.rs | 3 --- 5 files changed, 8 deletions(-) diff --git a/hypervisor/src/arch/x86/emulator/instructions/cmp.rs b/hypervisor/src/arch/x86/emulator/instructions/cmp.rs index 3dca00938..61c2152d5 100644 --- a/hypervisor/src/arch/x86/emulator/instructions/cmp.rs +++ b/hypervisor/src/arch/x86/emulator/instructions/cmp.rs @@ -209,8 +209,6 @@ impl InstructionHandler for Cmp_rm64_imm8 { #[cfg(test)] mod tests { - #![allow(unused_mut)] - use super::*; use crate::arch::x86::emulator::mock_vmm::*; diff --git a/hypervisor/src/arch/x86/emulator/instructions/mov.rs b/hypervisor/src/arch/x86/emulator/instructions/mov.rs index 318786fc2..1cabe4eb9 100644 --- a/hypervisor/src/arch/x86/emulator/instructions/mov.rs +++ b/hypervisor/src/arch/x86/emulator/instructions/mov.rs @@ -269,7 +269,6 @@ impl InstructionHandler for Mov_RAX_moffs64 { #[cfg(test)] mod tests { - #![allow(unused_mut)] use super::*; use crate::arch::x86::emulator::mock_vmm::*; diff --git a/hypervisor/src/arch/x86/emulator/instructions/movs.rs b/hypervisor/src/arch/x86/emulator/instructions/movs.rs index f6150b6a5..330ebce81 100644 --- a/hypervisor/src/arch/x86/emulator/instructions/movs.rs +++ b/hypervisor/src/arch/x86/emulator/instructions/movs.rs @@ -100,7 +100,6 @@ impl InstructionHandler for Movsb_m8_m8 { #[cfg(test)] mod tests { - #![allow(unused_mut)] use super::*; use crate::arch::x86::emulator::mock_vmm::*; diff --git a/hypervisor/src/arch/x86/emulator/instructions/or.rs b/hypervisor/src/arch/x86/emulator/instructions/or.rs index f3af25fd7..7af356f20 100644 --- a/hypervisor/src/arch/x86/emulator/instructions/or.rs +++ b/hypervisor/src/arch/x86/emulator/instructions/or.rs @@ -50,7 +50,6 @@ impl InstructionHandler for Or_rm8_r8 { #[cfg(test)] mod tests { - #![allow(unused_mut)] use super::*; use crate::arch::x86::emulator::mock_vmm::*; diff --git a/hypervisor/src/arch/x86/emulator/mod.rs b/hypervisor/src/arch/x86/emulator/mod.rs index 6ebabcfd0..632a3c5f6 100644 --- a/hypervisor/src/arch/x86/emulator/mod.rs +++ b/hypervisor/src/arch/x86/emulator/mod.rs @@ -648,8 +648,6 @@ impl<'a, T: CpuStateManager> Emulator<'a, T> { #[cfg(test)] mod mock_vmm { - #![allow(unused_mut)] - use super::*; use crate::arch::x86::emulator::EmulatorCpuState as CpuState; use crate::arch::x86::gdt::{gdt_entry, segment_from_gdt}; @@ -770,7 +768,6 @@ mod mock_vmm { #[cfg(test)] mod tests { - #![allow(unused_mut)] use super::*; use crate::arch::x86::emulator::mock_vmm::*;