mirror of
https://github.com/sharkdp/hyperfine.git
synced 2026-11-02 01:00:31 +00:00
Auto-fix clippy warnings
This commit is contained in:
1 parent
489e30cbae
commit
85730b3f0f
6 files changed
+17
-20
No files matched your search
+10
-11
@@ -147,10 +147,10 @@ pub fn mean_shell_spawning_time(
|
||||
}
|
||||
}
|
||||
|
||||
progress_bar.as_ref().map(|bar| bar.inc(1));
|
||||
if let Some(bar) = progress_bar.as_ref() { bar.inc(1) }
|
||||
}
|
||||
|
||||
progress_bar.as_ref().map(|bar| bar.finish_and_clear());
|
||||
if let Some(bar) = progress_bar.as_ref() { bar.finish_and_clear() }
|
||||
|
||||
Ok(TimingResult {
|
||||
time_real: mean(×_real),
|
||||
@@ -276,9 +276,9 @@ pub fn run_benchmark(
|
||||
options.failure_action,
|
||||
None,
|
||||
)?;
|
||||
progress_bar.as_ref().map(|bar| bar.inc(1));
|
||||
if let Some(bar) = progress_bar.as_ref() { bar.inc(1) }
|
||||
}
|
||||
progress_bar.as_ref().map(|bar| bar.finish_and_clear());
|
||||
if let Some(bar) = progress_bar.as_ref() { bar.finish_and_clear() }
|
||||
}
|
||||
|
||||
// Set up progress bar (and spinner for initial measurement)
|
||||
@@ -331,8 +331,8 @@ pub fn run_benchmark(
|
||||
all_succeeded = all_succeeded && success;
|
||||
|
||||
// Re-configure the progress bar
|
||||
progress_bar.as_ref().map(|bar| bar.set_length(count));
|
||||
progress_bar.as_ref().map(|bar| bar.inc(1));
|
||||
if let Some(bar) = progress_bar.as_ref() { bar.set_length(count) }
|
||||
if let Some(bar) = progress_bar.as_ref() { bar.inc(1) }
|
||||
|
||||
// Gather statistics
|
||||
for _ in 0..count_remaining {
|
||||
@@ -343,9 +343,8 @@ pub fn run_benchmark(
|
||||
format!("Current estimate: {}", mean.to_string().green())
|
||||
};
|
||||
|
||||
progress_bar
|
||||
.as_ref()
|
||||
.map(|bar| bar.set_message(msg.to_owned()));
|
||||
if let Some(bar) = progress_bar
|
||||
.as_ref() { bar.set_message(msg.to_owned()) }
|
||||
|
||||
let (res, status) = time_shell_command(
|
||||
&options.shell,
|
||||
@@ -363,10 +362,10 @@ pub fn run_benchmark(
|
||||
|
||||
all_succeeded = all_succeeded && success;
|
||||
|
||||
progress_bar.as_ref().map(|bar| bar.inc(1));
|
||||
if let Some(bar) = progress_bar.as_ref() { bar.inc(1) }
|
||||
}
|
||||
|
||||
progress_bar.as_ref().map(|bar| bar.finish_and_clear());
|
||||
if let Some(bar) = progress_bar.as_ref() { bar.finish_and_clear() }
|
||||
|
||||
// Compute statistical quantities
|
||||
let t_num = times_real.len();
|
||||
|
||||
Reference in new issue
Block a user