diff options
author | Matthias Beyer <matthias.beyer@atos.net> | 2021-12-02 13:15:38 +0100 |
---|---|---|
committer | Matthias Beyer <matthias.beyer@atos.net> | 2021-12-02 14:23:48 +0100 |
commit | 366c26f7f47d55f99b8684e95d78c9740dda1e34 (patch) | |
tree | facef3cb7384cb14293a8ef90f5f26bce0e61743 /src | |
parent | 1438fc5ee803cf78ed29bf0e030b3cf1fd72f33e (diff) |
Remove spinner support in progress bar helper
Signed-off-by: Matthias Beyer <matthias.beyer@atos.net>
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 - } - } } |