Fix clippy warnings

This commit is contained in:
David Peter committed 2022-05-17 22:57:10 +02:00
1 parent 623ce2d2d9
commit ec4321392f
3 files changed
+3 -3

No files matched your search

+1 -1
View File
@@ -288,7 +288,7 @@ impl<'a> Benchmark<'a> {
" Time ({} ≡): {:>8} {:>8} [User: {}, System: {}]",
"abs".green().bold(),
mean_str.green().bold(),
" ".to_string(), // alignment
" ", // alignment
user_str.blue(),
system_str.blue()
);
+1 -1
View File
@@ -85,7 +85,7 @@ fn table_row(entry: &BenchmarkResultWithRelativeSpeed, unit: Unit) -> Vec<u8> {
| {min} \n\
| {max} \n\
| {rel}{rel_stddev} \n",
command = result.command.replace("|", "\\|"),
command = result.command.replace('|', "\\|"),
mean = mean_str,
stddev = stddev_str,
min = min_str,
+1 -1
View File
@@ -86,7 +86,7 @@ fn determine_unit_from_results(results: &[BenchmarkResult]) -> Unit {
impl<T: MarkupExporter> Exporter for T {
fn serialize(&self, results: &[BenchmarkResult], unit: Option<Unit>) -> Result<Vec<u8>> {
let unit = unit.unwrap_or_else(|| determine_unit_from_results(&results));
let unit = unit.unwrap_or_else(|| determine_unit_from_results(results));
let entries = relative_speed::compute(results);
if entries.is_none() {
return Err(anyhow!(