aboutsummaryrefslogtreecommitdiffstats
path: root/src/power/sys
diff options
context:
space:
mode:
authorJesse Luehrs <doy@tozt.net>2023-03-26 00:10:35 -0400
committerJesse Luehrs <doy@tozt.net>2023-03-26 00:10:35 -0400
commit93e6a9a08aec3cbb8b847a815ad905aa0d0bffca (patch)
tree9c9d3922475e846bd11293d91ddee36b56302355 /src/power/sys
parentf252f4c6595421339cb3119f1ca8ef491077f365 (diff)
downloadfancy-prompt-93e6a9a08aec3cbb8b847a815ad905aa0d0bffca.tar.gz
fancy-prompt-93e6a9a08aec3cbb8b847a815ad905aa0d0bffca.zip
fmt
Diffstat (limited to 'src/power/sys')
-rw-r--r--src/power/sys/linux.rs7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/power/sys/linux.rs b/src/power/sys/linux.rs
index 9b4bcc4..90115a2 100644
--- a/src/power/sys/linux.rs
+++ b/src/power/sys/linux.rs
@@ -18,10 +18,11 @@ pub fn power_supplies() -> Vec<super::PowerSupplyInfo> {
let ty = super::super::slurp(entry.path().join("type"))
.map(|t: String| super::PowerSupplyType::from_str(&t))
.expect("couldn't find power supply type");
- let energy_full = super::super::slurp(entry.path().join("energy_full"));
+ let energy_full =
+ super::super::slurp(entry.path().join("energy_full"));
let energy_now = super::super::slurp(entry.path().join("energy_now"));
- let online =
- super::super::slurp(entry.path().join("online")).map(|n: u8| n != 0);
+ let online = super::super::slurp(entry.path().join("online"))
+ .map(|n: u8| n != 0);
power_supplies.push(super::PowerSupplyInfo {
name,