mirror of
https://github.com/sharkdp/hyperfine.git
synced 2026-11-01 08:50:19 +00:00
Updates for 0.4.0
This commit is contained in:
1 parent
2e24ff012a
commit
89e6d37562
7 files changed
+24
-23
No files matched your search
@@ -62,16 +62,16 @@ impl Default for HyperfineOptions {
|
||||
|
||||
/// Return a pre-configured progress bar
|
||||
pub fn get_progress_bar(length: u64, msg: &str, option: &OutputStyleOption) -> ProgressBar {
|
||||
let progressbar_style = match option {
|
||||
&OutputStyleOption::Basic => ProgressStyle::default_bar(),
|
||||
&OutputStyleOption::Full => ProgressStyle::default_spinner()
|
||||
.tick_chars("⠋⠙⠹⠸⠼⠴⠦⠧⠇⠏")
|
||||
.template(" {spinner} {msg:<30} {wide_bar} ETA {eta_precise}"),
|
||||
let progressbar_style = match *option {
|
||||
OutputStyleOption::Basic => ProgressStyle::default_bar(),
|
||||
OutputStyleOption::Full => 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 => ProgressBar::new(length),
|
||||
let progress_bar = match *option {
|
||||
OutputStyleOption::Basic => ProgressBar::hidden(),
|
||||
OutputStyleOption::Full => ProgressBar::new(length),
|
||||
};
|
||||
progress_bar.set_style(progressbar_style.clone());
|
||||
progress_bar.enable_steady_tick(80);
|
||||
|
||||
Reference in new issue
Block a user