mirror of
https://github.com/ClementTsang/bottom.git
synced 2025-07-23 05:34:57 +02:00
Fix a quite large bug with disks table display.
This commit is contained in:
parent
514c39cc56
commit
2c7ab558d0
@ -1,6 +1,6 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "bottom"
|
name = "bottom"
|
||||||
version = "0.2.0"
|
version = "0.1.1"
|
||||||
authors = ["Clement Tsang <clementjhtsang@gmail.com>"]
|
authors = ["Clement Tsang <clementjhtsang@gmail.com>"]
|
||||||
edition = "2018"
|
edition = "2018"
|
||||||
repository = "https://github.com/ClementTsang/bottom"
|
repository = "https://github.com/ClementTsang/bottom"
|
||||||
|
@ -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?;
|
let usage = heim::disk::usage(partition.mount_point().to_path_buf()).await?;
|
||||||
|
|
||||||
vec_disks.push(DiskData {
|
vec_disks.push(DiskData {
|
||||||
free_space: usage.free().get::<information::megabyte>(),
|
free_space: usage.free().get::<information::byte>(),
|
||||||
used_space: usage.used().get::<information::megabyte>(),
|
used_space: usage.used().get::<information::byte>(),
|
||||||
total_space: usage.total().get::<information::megabyte>(),
|
total_space: usage.total().get::<information::byte>(),
|
||||||
mount_point: Box::from(
|
mount_point: Box::from(
|
||||||
partition
|
partition
|
||||||
.mount_point()
|
.mount_point()
|
||||||
|
@ -727,7 +727,7 @@ fn draw_disk_table<B: backend::Backend>(
|
|||||||
});
|
});
|
||||||
|
|
||||||
Table::new(
|
Table::new(
|
||||||
["Disk", "Mount", "Used", "Total", "Free", "R/s", "W/s"].iter(),
|
["Disk", "Mount", "Used", "Free", "Total", "R/s", "W/s"].iter(),
|
||||||
disk_rows,
|
disk_rows,
|
||||||
)
|
)
|
||||||
.block(
|
.block(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user