From be0e6b9dd7e8ce6f05755a9976e3592c951ff31e Mon Sep 17 00:00:00 2001 From: bjorn3 <17426603+bjorn3@users.noreply.github.com> Date: Sun, 21 Jan 2024 20:46:00 +0100 Subject: [PATCH] Pass self instead of &self to PciFeature methods PciFeature is Copy, so passing it behind a reference is not necessary. --- pcid/src/driver_interface/mod.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pcid/src/driver_interface/mod.rs b/pcid/src/driver_interface/mod.rs index 6357ec5a92..4f7fd64703 100644 --- a/pcid/src/driver_interface/mod.rs +++ b/pcid/src/driver_interface/mod.rs @@ -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)]