Fix clippy warnings

This commit is contained in:
Adrian Woźniak 2021-08-22 21:05:01 +02:00
parent a68eeda117
commit 772b461565
No known key found for this signature in database
GPG Key ID: 0012845A89C7352B

View File

@ -17,7 +17,6 @@ const PULSE_WIDTH_MODULATION_MODE: &str = "pwm1_enable";
// static PULSE_WIDTH_MODULATION_DISABLED: &str = "0"; // static PULSE_WIDTH_MODULATION_DISABLED: &str = "0";
const PULSE_WIDTH_MODULATION_AUTO: &str = "2"; const PULSE_WIDTH_MODULATION_AUTO: &str = "2";
const PULSE_WIDTH_MODULATION_MANUAL: &str = "1";
#[derive(Debug)] #[derive(Debug)]
pub struct HwMon { pub struct HwMon {
@ -117,12 +116,6 @@ impl HwMon {
}) })
} }
pub fn is_fan_manual(&self) -> bool {
self.read(PULSE_WIDTH_MODULATION_MODE)
.map(|s| s.as_str() == PULSE_WIDTH_MODULATION_MANUAL)
.unwrap_or_default()
}
pub fn is_fan_automatic(&self) -> bool { pub fn is_fan_automatic(&self) -> bool {
self.read(PULSE_WIDTH_MODULATION_MODE) self.read(PULSE_WIDTH_MODULATION_MODE)
.map(|s| s.as_str() == PULSE_WIDTH_MODULATION_AUTO) .map(|s| s.as_str() == PULSE_WIDTH_MODULATION_AUTO)