diff --git a/pci/src/configuration.rs b/pci/src/configuration.rs index 2e714d04e..c89390fb6 100644 --- a/pci/src/configuration.rs +++ b/pci/src/configuration.rs @@ -452,10 +452,9 @@ impl From for PciBarRegionType { } } -#[allow(clippy::from_over_into)] -impl Into for PciBarRegionType { - fn into(self) -> PciBarType { - match self { +impl From for PciBarType { + fn from(val: PciBarRegionType) -> Self { + match val { PciBarRegionType::IoRegion => PciBarType::Io, PciBarRegionType::Memory32BitRegion => PciBarType::Mmio32, PciBarRegionType::Memory64BitRegion => PciBarType::Mmio64, @@ -469,10 +468,9 @@ pub enum PciBarPrefetchable { Prefetchable = 0x08, } -#[allow(clippy::from_over_into)] -impl Into for PciBarPrefetchable { - fn into(self) -> bool { - match self { +impl From for bool { + fn from(val: PciBarPrefetchable) -> Self { + match val { PciBarPrefetchable::NotPrefetchable => false, PciBarPrefetchable::Prefetchable => true, }