Make checks more concise

This commit is contained in:
Steve Pentland authored and David Peter committed 2018-02-20 21:42:47 +01:00
1 parent faf00b6985
commit 4829dfbc85
2 files changed
+4 -6

No files matched your search

+2 -2
View File
@@ -67,14 +67,14 @@ impl Default for HyperfineOptions {
pub fn get_progress_bar(length: u64, msg: &str, option: &OutputStyleOption) -> ProgressBar {
let progressbar_style = match *option {
OutputStyleOption::Basic => ProgressStyle::default_bar(),
OutputStyleOption::Full | OutputStyleOption::NoColor => ProgressStyle::default_spinner()
_ => ProgressStyle::default_spinner()
.tick_chars("⠋⠙⠹⠸⠼⠴⠦⠧⠇⠏")
.template(" {spinner} {msg:<30} {wide_bar} ETA {eta_precise}"),
};
let progress_bar = match *option {
OutputStyleOption::Basic => ProgressBar::hidden(),
OutputStyleOption::Full | OutputStyleOption::NoColor => ProgressBar::new(length),
_ => ProgressBar::new(length),
};
progress_bar.set_style(progressbar_style.clone());
progress_bar.enable_steady_tick(80);