hive-agent: build the multi-line test fixture without format_collect

clippy::format_collect (pedantic, denied) fires on
`(0..40).map(|i| format!(...)).collect::<String>()`. The test only needs
40 non-empty lines, not numbered ones, so `"line\n".repeat(40)` says the
same thing without the lint.
This commit is contained in:
atlas 2026-09-02 10:43:54 +02:00 committed by mara
commit 584db1e9c4

View file

@ -1249,7 +1249,7 @@ mod tests {
#[test] #[test]
fn a_long_tool_result_reports_its_line_count() { fn a_long_tool_result_reports_its_line_count() {
let txt = (0..40).map(|i| format!("line {i}\n")).collect::<String>(); let txt = "line\n".repeat(40);
let trimmed: String = txt.split_whitespace().collect::<Vec<_>>().join(" "); let trimmed: String = txt.split_whitespace().collect::<Vec<_>>().join(" ");
assert!(summarize_tool_result(&txt, &trimmed).starts_with("40L · ")); assert!(summarize_tool_result(&txt, &trimmed).starts_with("40L · "));
} }