summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorClementTsang <clementjhtsang@gmail.com>2020-01-09 22:04:32 -0500
committerClementTsang <clementjhtsang@gmail.com>2020-01-09 22:04:32 -0500
commit2c7ab558d04f8e0a271ebb8fd23fc7b54a8763e5 (patch)
treed5a565ee4beab19b2dbeca14ac51d084426c5796 /src
parent514c39cc56d434d54145f30075bc6eb5a0f1a496 (diff)
Fix a quite large bug with disks table display.
Diffstat (limited to 'src')
-rw-r--r--src/app/data_collection/disks.rs6
-rw-r--r--src/canvas.rs2
2 files changed, 4 insertions, 4 deletions
diff --git a/src/app/data_collection/disks.rs b/src/app/data_collection/disks.rs
index eec34d32..bf564ab2 100644
--- a/src/app/data_collection/disks.rs
+++ b/src/app/data_collection/disks.rs
@@ -72,9 +72,9 @@ pub async fn get_disk_usage_list() -> crate::utils::error::Result<Vec<DiskData>>
let usage = heim::disk::usage(partition.mount_point().to_path_buf()).await?;
vec_disks.push(DiskData {
- free_space: usage.free().get::<information::megabyte>(),
- used_space: usage.used().get::<information::megabyte>(),
- total_space: usage.total().get::<information::megabyte>(),
+ free_space: usage.free().get::<information::byte>(),
+ used_space: usage.used().get::<information::byte>(),
+ total_space: usage.total().get::<information::byte>(),
mount_point: Box::from(
partition
.mount_point()
diff --git a/src/canvas.rs b/src/canvas.rs
index 96a6b824..bc0eaef1 100644
--- a/src/canvas.rs
+++ b/src/canvas.rs
@@ -727,7 +727,7 @@ fn draw_disk_table<B: backend::Backend>(
});
Table::new(
- ["Disk", "Mount", "Used", "Total", "Free", "R/s", "W/s"].iter(),
+ ["Disk", "Mount", "Used", "Free", "Total", "R/s", "W/s"].iter(),
disk_rows,
)
.block(