diff --git a/vm-device/src/bus.rs b/vm-device/src/bus.rs index eacca2498..ed5dca562 100644 --- a/vm-device/src/bus.rs +++ b/vm-device/src/bus.rs @@ -18,7 +18,7 @@ use thiserror::Error; /// /// The device does not care where it exists in address space as each method is only given an offset /// into its allocated portion of address space. -#[allow(unused_variables)] +#[expect(unused_variables)] pub trait BusDevice: Send { /// Reads at `offset` from this device fn read(&mut self, base: u64, offset: u64, data: &mut [u8]) {} @@ -28,7 +28,7 @@ pub trait BusDevice: Send { } } -#[allow(unused_variables)] +#[expect(unused_variables)] pub trait BusDeviceSync: Send + Sync { /// Reads at `offset` from this device fn read(&self, base: u64, offset: u64, data: &mut [u8]) {} @@ -136,7 +136,6 @@ impl Bus { dev.upgrade().map(|d| (*range, d.clone())) } - #[allow(clippy::type_complexity)] fn resolve(&self, addr: u64) -> Option<(u64, u64, Arc)> { if let Some((range, dev)) = self.first_before(addr) { let offset = addr - range.base; @@ -150,7 +149,7 @@ impl Bus { /// Inserts a bus device into the bus. /// /// The bus will only hold a weak reference to the object. - #[allow(clippy::needless_pass_by_value)] + #[expect(clippy::needless_pass_by_value)] pub fn insert(&self, device: Arc, base: u64, len: u64) -> Result<()> { if len == 0 { return Err(Error::ZeroSizedRange); diff --git a/vm-device/src/interrupt/mod.rs b/vm-device/src/interrupt/mod.rs index e9b0180d2..859c27bc4 100644 --- a/vm-device/src/interrupt/mod.rs +++ b/vm-device/src/interrupt/mod.rs @@ -164,7 +164,6 @@ pub trait InterruptSourceGroup: Send + Sync { /// An interrupt notifier allows for external components and processes /// to inject interrupts into a guest, by writing to the [`EventFd`] returned /// by this method. - #[allow(unused_variables)] fn notifier(&self, index: InterruptIndex) -> Option; /// Update the interrupt source group configuration. diff --git a/vm-device/src/lib.rs b/vm-device/src/lib.rs index 61e765950..8df15f4fb 100644 --- a/vm-device/src/lib.rs +++ b/vm-device/src/lib.rs @@ -34,7 +34,7 @@ pub enum PciBarType { } /// Enumeration for device resources. -#[allow(missing_docs)] +#[expect(missing_docs)] #[derive(Clone, Debug, Serialize, Deserialize)] pub enum Resource { /// IO Port address range.