tui: round disk sizes when displaying

Signed-off-by: Christoph Heiss <c.heiss@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
Christoph Heiss 2023-06-19 14:35:05 +02:00 committed by Thomas Lamprecht
parent beec6a1754
commit 706cdb2afd

View File

@ -232,7 +232,7 @@ impl fmt::Display for Disk {
// https://lists.proxmox.com/pipermail/pbs-devel/2023-May/006125.html
write!(
f,
"{} ({} GiB)",
"{} ({:.2} GiB)",
self.path,
(self.size as f64) / 1024. / 1024. / 1024.
)