From 366c26f7f47d55f99b8684e95d78c9740dda1e34 Mon Sep 17 00:00:00 2001 From: Matthias Beyer Date: Thu, 2 Dec 2021 13:15:38 +0100 Subject: Remove spinner support in progress bar helper Signed-off-by: Matthias Beyer --- src/main.rs | 1 - src/util/progress.rs | 14 +------------- 2 files changed, 1 insertion(+), 14 deletions(-) (limited to 'src') diff --git a/src/main.rs b/src/main.rs index c0ee15a..a120523 100644 --- a/src/main.rs +++ b/src/main.rs @@ -139,7 +139,6 @@ async fn main() -> Result<()> { let hide_bars = cli.is_present("hide_bars") || crate::util::stdout_is_pipe(); let progressbars = ProgressBars::setup( config.progress_format().clone(), - config.spinner_format().clone(), hide_bars, ); diff --git a/src/util/progress.rs b/src/util/progress.rs index b2edc08..3a42b52 100644 --- a/src/util/progress.rs +++ b/src/util/progress.rs @@ -14,17 +14,15 @@ use getset::CopyGetters; #[derive(Clone, Debug, CopyGetters)] pub struct ProgressBars { bar_template: String, - spinner_template: String, #[getset(get_copy = "pub")] hide: bool, } impl ProgressBars { - pub fn setup(bar_template: String, spinner_template: String, hide: bool) -> Self { + pub fn setup(bar_template: String, hide: bool) -> Self { ProgressBars { bar_template, - spinner_template, hide, } } @@ -38,14 +36,4 @@ impl ProgressBars { b } } - - pub fn spinner(&self) -> ProgressBar { - if self.hide { - ProgressBar::hidden() - } else { - let bar = ProgressBar::new_spinner(); - bar.set_style(ProgressStyle::default_spinner().template(&self.spinner_template)); - bar - } - } } -- cgit v1.2.3