Use .unwrap_or_default() in pwm_min/fan_min

This commit is contained in:
Richard Kuhnt 2021-07-28 21:07:00 +02:00
parent 56b5ff2f89
commit cbe1203fb0

View File

@ -64,7 +64,7 @@ impl HwMon {
.unwrap_or(0), .unwrap_or(0),
) )
}; };
self.fan_min.unwrap_or(0) self.fan_min.unwrap_or_default()
} }
pub fn fan_max(&mut self) -> u32 { pub fn fan_max(&mut self) -> u32 {
@ -95,7 +95,7 @@ impl HwMon {
.unwrap_or(0), .unwrap_or(0),
) )
}; };
self.pwm_min.unwrap_or(0) self.pwm_min.unwrap_or_default()
} }
pub fn pwm_max(&mut self) -> u32 { pub fn pwm_max(&mut self) -> u32 {