Skip to content

Commit 4d2fc8c

Browse files
committed
Keep hwmon sensor name for non-GPUs too
1 parent f2943e7 commit 4d2fc8c

File tree

1 file changed

+5
-3
lines changed
  • src/app/data_harvester/temperature

1 file changed

+5
-3
lines changed

src/app/data_harvester/temperature/linux.rs

+5-3
Original file line numberDiff line numberDiff line change
@@ -139,10 +139,12 @@ fn get_from_hwmon(
139139
.map(|f| f.to_str().unwrap_or_default().to_owned())
140140
.unwrap();
141141
if link.as_bytes()[0].is_ascii_alphabetic() {
142-
Some(link)
142+
if let Some(hwmon_name) = hwmon_name.as_ref() {
143+
Some(format!("{} ({})", link, hwmon_name.trim()))
144+
} else {
145+
Some(link)
146+
}
143147
} else {
144-
// No idea why rust thinks this may have been moved
145-
// in a previous loop iteration and needs a clone
146148
hwmon_name.clone()
147149
}
148150
}

0 commit comments

Comments
 (0)