From 6614641315b9b265b1dfc0922834b7e5d7b88455 Mon Sep 17 00:00:00 2001 From: Martin Pool Date: Mon, 11 Nov 2024 09:02:15 -0800 Subject: [PATCH] Avoid with_capacity for now --- src/list.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/list.rs b/src/list.rs index db2cd6e1..f1ad3bbb 100644 --- a/src/list.rs +++ b/src/list.rs @@ -35,7 +35,9 @@ pub fn list_mutants(mutants: &[Mutant], options: &Options) -> String { // TODO: Do we need to check this? Could the console library strip them if they're not // supported? let colors = options.colors.active_stdout(); - let mut out = String::with_capacity(200 * mutants.len()); + // let mut out = String::with_capacity(200 * mutants.len()); + // TODO: Use with_capacity when we can have mutants skip it (#315 + let mut out = String::new(); for mutant in mutants { out.push_str(&mutant.name(options.show_line_col, colors)); out.push('\n');