Skip to content
Myr

Updates for indicatif 0.17

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by David Peter · committed by David Peter · parent e2d702e · Browse files · 1 file+4 added−2 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+4 added−2 removed

  • other:+4 added−2 removed

1 file+4 added−2 removed

modified:src/output/progress_bar.rs+4 added-2 removed
1use indicatif::{ProgressBar, ProgressStyle};2use std::time::Duration;34use crate::options::OutputStyleOption;56#[cfg(not(windows))]
7 unmodified lines
14 let progressbar_style = match option {15 OutputStyleOption::Basic | OutputStyleOption::Color => ProgressStyle::default_bar(),16 _ => ProgressStyle::default_spinner()17 .tick_chars(TICK_SETTINGS.0)17 .template(" {spinner} {msg:<30} {wide_bar} ETA {eta_precise}"),18 .template(" {spinner} {msg:<30} {wide_bar} ETA {eta_precise}")19 .expect("no template error"),20 };2122 let progress_bar = match option {23 OutputStyleOption::Basic | OutputStyleOption::Color => ProgressBar::hidden(),24 _ => ProgressBar::new(length),25 };26 progress_bar.set_style(progressbar_style);25 progress_bar.enable_steady_tick(TICK_SETTINGS.1);27 progress_bar.enable_steady_tick(Duration::from_millis(TICK_SETTINGS.1));28 progress_bar.set_message(msg.to_owned());2930 progress_bar31}