Pass self instead of &self to PciFeature methods

PciFeature is Copy, so passing it behind a reference is not necessary.
This commit is contained in:
bjorn3
2024-01-21 20:46:00 +01:00
parent d0e90f5ded
commit be0e6b9dd7
+4 -4
View File
@@ -85,11 +85,11 @@ pub enum PciFeature {
MsiX,
}
impl PciFeature {
pub fn is_msi(&self) -> bool {
if let &Self::Msi = self { true } else { false }
pub fn is_msi(self) -> bool {
if let Self::Msi = self { true } else { false }
}
pub fn is_msix(&self) -> bool {
if let &Self::MsiX = self { true } else { false }
pub fn is_msix(self) -> bool {
if let Self::MsiX = self { true } else { false }
}
}
#[derive(Debug, Serialize, Deserialize)]