summaryrefslogtreecommitdiff
path: root/cli/util/progress_bar/mod.rs
diff options
context:
space:
mode:
Diffstat (limited to 'cli/util/progress_bar/mod.rs')
-rw-r--r--cli/util/progress_bar/mod.rs17
1 files changed, 16 insertions, 1 deletions
diff --git a/cli/util/progress_bar/mod.rs b/cli/util/progress_bar/mod.rs
index 91bf4950f..85be056d8 100644
--- a/cli/util/progress_bar/mod.rs
+++ b/cli/util/progress_bar/mod.rs
@@ -28,6 +28,7 @@ pub enum ProgressMessagePrompt {
Download,
Blocking,
Initialize,
+ Cleaning,
}
impl ProgressMessagePrompt {
@@ -38,6 +39,7 @@ impl ProgressMessagePrompt {
ProgressMessagePrompt::Initialize => {
colors::green("Initialize").to_string()
}
+ ProgressMessagePrompt::Cleaning => colors::green("Cleaning").to_string(),
}
}
}
@@ -71,7 +73,13 @@ impl UpdateGuard {
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
pub enum ProgressBarStyle {
+ /// Shows a progress bar with human readable download size
DownloadBars,
+
+ /// Shows a progress bar with numeric progres count
+ ProgressBars,
+
+ /// Shows a list of currently downloaded files.
TextOnly,
}
@@ -270,7 +278,14 @@ impl ProgressBar {
Self {
inner: ProgressBarInner::new(match style {
ProgressBarStyle::DownloadBars => {
- Arc::new(renderer::BarProgressBarRenderer)
+ Arc::new(renderer::BarProgressBarRenderer {
+ display_human_download_size: true,
+ })
+ }
+ ProgressBarStyle::ProgressBars => {
+ Arc::new(renderer::BarProgressBarRenderer {
+ display_human_download_size: false,
+ })
}
ProgressBarStyle::TextOnly => {
Arc::new(renderer::TextOnlyProgressBarRenderer::default())