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:
parent
ab30136255
commit
584db1e9c4
1 changed files with 1 additions and 1 deletions
|
|
@ -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 · "));
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue