Skip to content
Myr

Make checks more concise

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

authored by Steve Pentland · committed by David Peter · parent faf00b6 · Browse files · 2 files+4 added−6 removed
This commit

State

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

Diff stats

2 files+4 added−6 removed

  • other:+4 added−6 removed

2 files+4 added−6 removed

modified:src/hyperfine/internal.rs+2 added-2 removed
65 unmodified lines
66/// Return a pre-configured progress bar67pub fn get_progress_bar(length: u64, msg: &str, option: &OutputStyleOption) -> ProgressBar {68 let progressbar_style = match *option {69 OutputStyleOption::Basic => ProgressStyle::default_bar(),70 OutputStyleOption::Full | OutputStyleOption::NoColor => ProgressStyle::default_spinner()70 _ => ProgressStyle::default_spinner()71 .tick_chars("⠋⠙⠹⠸⠼⠴⠦⠧⠇⠏")72 .template(" {spinner} {msg:<30} {wide_bar} ETA {eta_precise}"),73 };7475 let progress_bar = match *option {76 OutputStyleOption::Basic => ProgressBar::hidden(),77 OutputStyleOption::Full | OutputStyleOption::NoColor => ProgressBar::new(length),77 _ => ProgressBar::new(length),78 };79 progress_bar.set_style(progressbar_style.clone());80 progress_bar.enable_steady_tick(80);81 progress_bar.set_message(msg);
26 unmodified lines
modified:src/main.rs+2 added-4 removed
156 unmodified lines
157 OutputStyleOption::Basic158 },159 };160161 // We default Windows to NoColor if full or auto had been specified.161 // We default Windows to NoColor if full had been specified.162 if cfg!(windows) && options.output_style == OutputStyleOption::Full {163 options.output_style = OutputStyleOption::NoColor;164 }165166 if options.output_style == OutputStyleOption::Basic167 || options.output_style == OutputStyleOption::NoColor168 {166 if options.output_style != OutputStyleOption::Full {167 colored::control::set_override(false);168 }169170 if matches.is_present("ignore-failure") {
10 unmodified lines