diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/main.rs | 1 | ||||
-rw-r--r-- | src/util/progress.rs | 14 |
2 files changed, 1 insertions, 14 deletions
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 - } - } } |