trying different stöff

This commit is contained in:
2025-08-09 17:52:01 +02:00
parent a8cfbbf766
commit cfd9fef3e9
6 changed files with 17 additions and 21 deletions

View File

@@ -132,11 +132,7 @@ pub fn get_disk_utitlization() -> Result<(f64, f64, f64, f64), Box<dyn Error>> {
}
pub fn _get_disk_temp_for_component(component: &Component) -> Option<f64> {
if let Some(temp) = component.temperature() {
Some(temp as f64)
} else {
None
}
component.temperature().map(|temp| temp as f64)
}
pub fn _get_disk_load_for_disk(disk: &Disk) -> Result<(f64, f64, f64, f64), Box<dyn Error>> {