From 874b19bfccf337b8a8726d2bbb9439cbd48ca53e Mon Sep 17 00:00:00 2001 From: Weihang Lo Date: Thu, 20 Nov 2025 12:13:24 -0500 Subject: [PATCH] refactor(timings): use itertools string join --- src/cargo/core/compiler/timings/report.rs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/cargo/core/compiler/timings/report.rs b/src/cargo/core/compiler/timings/report.rs index b3b143ac5..16916bb04 100644 --- a/src/cargo/core/compiler/timings/report.rs +++ b/src/cargo/core/compiler/timings/report.rs @@ -123,12 +123,13 @@ fn write_summary_table( duration: f64, error: &Option, ) -> CargoResult<()> { - let targets: Vec = ctx + let targets = ctx .root_units .iter() .map(|(name, targets)| format!("{} ({})", name, targets.join(", "))) - .collect(); - let targets = targets.join("
"); + .collect::>() + .join("
"); + let total_units = ctx.total_fresh + ctx.total_dirty; let time_human = if duration > 60.0 {