Skip to content

Commit

Permalink
Keep hwmon sensor name for non-GPUs too
Browse files Browse the repository at this point in the history
  • Loading branch information
DianaNites committed Sep 18, 2022
1 parent 443c3e8 commit 4aad6cd
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/app/data_harvester/temperature/heim.rs
Original file line number Diff line number Diff line change
Expand Up @@ -128,10 +128,12 @@ pub async fn get_temperature_data(
.map(|f| f.to_str().unwrap_or_default().to_owned())
.unwrap();
if link.as_bytes()[0].is_ascii_alphabetic() {
Some(link)
if let Some(hwmon_name) = hwmon_name.as_ref() {
Some(format!("{} ({})", link, hwmon_name.trim()))
} else {
Some(link)
}
} else {
// No idea why rust thinks this may have been moved
// in a previous loop iteration and needs a clone
hwmon_name.clone()
}
}
Expand Down

0 comments on commit 4aad6cd

Please sign in to comment.