Avoid duplicated units in automatic quantity formatting

This commit is contained in:
David Peter authored and David Peter committed 2026-10-05 16:01:30 +02:00
1 parent cf381994d1
commit 8ed8757ac2
4 files changed
+28 -96

No files matched your search

+4 -1
View File
@@ -331,7 +331,10 @@ impl<'a> Benchmark<'a> {
let msg = {
let t_wall_clock_mean = measurements.time_wall_clock_mean();
let time_unit = t_wall_clock_mean.suitable_unit();
let time_unit = self
.options
.time_unit
.unwrap_or(t_wall_clock_mean.suitable_unit());
let mean = t_wall_clock_mean.format(time_unit);
format!("Current estimate: {}", mean.to_string().green())
};