progress: shorter format

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
This commit is contained in:
Fabian Grünbichler 2021-05-07 10:03:10 +02:00 committed by Dietmar Maurer
parent c9e6b07145
commit 94bc7957c1

View File

@ -42,7 +42,7 @@ impl std::fmt::Display for StoreProgress {
if self.group_snapshots == 0 { if self.group_snapshots == 0 {
write!( write!(
f, f,
"{:.2}% ({} of {} groups)", "{:.2}% ({}/{} groups)",
self.percentage() * 100.0, self.percentage() * 100.0,
self.done_groups, self.done_groups,
self.total_groups, self.total_groups,
@ -50,7 +50,7 @@ impl std::fmt::Display for StoreProgress {
} else if self.total_groups == 1 { } else if self.total_groups == 1 {
write!( write!(
f, f,
"{:.2}% ({} of {} snapshots)", "{:.2}% ({}/{} snapshots)",
self.percentage() * 100.0, self.percentage() * 100.0,
self.done_snapshots, self.done_snapshots,
self.group_snapshots, self.group_snapshots,
@ -58,7 +58,7 @@ impl std::fmt::Display for StoreProgress {
} else if self.done_snapshots == self.group_snapshots { } else if self.done_snapshots == self.group_snapshots {
write!( write!(
f, f,
"{:.2}% ({} of {} groups)", "{:.2}% ({}/{} groups)",
self.percentage() * 100.0, self.percentage() * 100.0,
current_group, current_group,
self.total_groups, self.total_groups,
@ -66,7 +66,7 @@ impl std::fmt::Display for StoreProgress {
} else { } else {
write!( write!(
f, f,
"{:.2}% ({} of {} groups, {} of {} group #{}'s snapshots)", "{:.2}% ({}/{} groups, {}/{} snapshots in group #{})",
self.percentage() * 100.0, self.percentage() * 100.0,
self.done_groups, self.done_groups,
self.total_groups, self.total_groups,