Fix remaining clippy warnings

This commit is contained in:
David Peter authored and David Peter committed 2021-08-22 16:33:43 +02:00
1 parent 85730b3f0f
commit 068bebb4e6
7 files changed
+44 -24

No files matched your search

+27 -10
View File
@@ -147,10 +147,14 @@ pub fn mean_shell_spawning_time(
}
}
if let Some(bar) = progress_bar.as_ref() { bar.inc(1) }
if let Some(bar) = progress_bar.as_ref() {
bar.inc(1)
}
}
if let Some(bar) = progress_bar.as_ref() { bar.finish_and_clear() }
if let Some(bar) = progress_bar.as_ref() {
bar.finish_and_clear()
}
Ok(TimingResult {
time_real: mean(&times_real),
@@ -276,9 +280,13 @@ pub fn run_benchmark(
options.failure_action,
None,
)?;
if let Some(bar) = progress_bar.as_ref() { bar.inc(1) }
if let Some(bar) = progress_bar.as_ref() {
bar.inc(1)
}
}
if let Some(bar) = progress_bar.as_ref() {
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 +339,12 @@ pub fn run_benchmark(
all_succeeded = all_succeeded && success;
// Re-configure the progress bar
if let Some(bar) = progress_bar.as_ref() { bar.set_length(count) }
if let Some(bar) = progress_bar.as_ref() { 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,8 +355,9 @@ pub fn run_benchmark(
format!("Current estimate: {}", mean.to_string().green())
};
if let Some(bar) = progress_bar
.as_ref() { 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,
@@ -362,10 +375,14 @@ pub fn run_benchmark(
all_succeeded = all_succeeded && success;
if let Some(bar) = progress_bar.as_ref() { bar.inc(1) }
if let Some(bar) = progress_bar.as_ref() {
bar.inc(1)
}
}
if let Some(bar) = progress_bar.as_ref() { 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();