From 584db1e9c42ada67dbf36aa77e3ababa86c96a57 Mon Sep 17 00:00:00 2001 From: atlas Date: Wed, 2 Sep 2026 10:43:54 +0200 Subject: [PATCH] hive-agent: build the multi-line test fixture without format_collect clippy::format_collect (pedantic, denied) fires on `(0..40).map(|i| format!(...)).collect::()`. The test only needs 40 non-empty lines, not numbered ones, so `"line\n".repeat(40)` says the same thing without the lint. --- hive-agent/src/stream_enrich.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hive-agent/src/stream_enrich.rs b/hive-agent/src/stream_enrich.rs index 81724b38..866f2569 100644 --- a/hive-agent/src/stream_enrich.rs +++ b/hive-agent/src/stream_enrich.rs @@ -1249,7 +1249,7 @@ mod tests { #[test] fn a_long_tool_result_reports_its_line_count() { - let txt = (0..40).map(|i| format!("line {i}\n")).collect::(); + let txt = "line\n".repeat(40); let trimmed: String = txt.split_whitespace().collect::>().join(" "); assert!(summarize_tool_result(&txt, &trimmed).starts_with("40L ยท ")); }