refactor(timings): use itertools string join

This commit is contained in:
Weihang Lo 2025-11-20 12:13:24 -05:00
parent 62ccd03f26
commit 874b19bfcc
No known key found for this signature in database
GPG Key ID: D7DBF189825E82E7

View File

@ -123,12 +123,13 @@ fn write_summary_table(
duration: f64,
error: &Option<anyhow::Error>,
) -> CargoResult<()> {
let targets: Vec<String> = ctx
let targets = ctx
.root_units
.iter()
.map(|(name, targets)| format!("{} ({})", name, targets.join(", ")))
.collect();
let targets = targets.join("<br>");
.collect::<Vec<_>>()
.join("<br>");
let total_units = ctx.total_fresh + ctx.total_dirty;
let time_human = if duration > 60.0 {