diff options
Diffstat (limited to 'src/widgets')
-rw-r--r-- | src/widgets/disk_table.rs | 4 | ||||
-rw-r--r-- | src/widgets/process_table/proc_widget_data.rs | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/src/widgets/disk_table.rs b/src/widgets/disk_table.rs index 45549e13..cdbefd19 100644 --- a/src/widgets/disk_table.rs +++ b/src/widgets/disk_table.rs @@ -69,7 +69,7 @@ impl DiskWidgetData { pub fn free_percent_string(&self) -> KString { match self.free_percent() { - Some(val) => format!("{:.1}%", val).into(), + Some(val) => format!("{val:.1}%").into(), None => "N/A".into(), } } @@ -90,7 +90,7 @@ impl DiskWidgetData { pub fn used_percent_string(&self) -> KString { match self.used_percent() { - Some(val) => format!("{:.1}%", val).into(), + Some(val) => format!("{val:.1}%").into(), None => "N/A".into(), } } diff --git a/src/widgets/process_table/proc_widget_data.rs b/src/widgets/process_table/proc_widget_data.rs index 925bbe65..418d9997 100644 --- a/src/widgets/process_table/proc_widget_data.rs +++ b/src/widgets/process_table/proc_widget_data.rs @@ -101,7 +101,7 @@ impl PartialOrd for MemUsage { impl Display for MemUsage { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { match self { - MemUsage::Percent(percent) => f.write_fmt(format_args!("{:.1}%", percent)), + MemUsage::Percent(percent) => f.write_fmt(format_args!("{percent:.1}%")), MemUsage::Bytes(bytes) => f.write_str(&binary_byte_string(*bytes)), } } |