@@ 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,
);
@@ 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
- }
- }
}