Fix clippy warnings
This commit is contained in:
parent
a68eeda117
commit
772b461565
@ -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)
|
||||||
|
Loading…
Reference in New Issue
Block a user