From 455d87caddc69d1b2589cd11638a341e136c891b Mon Sep 17 00:00:00 2001 From: mo8it Date: Thu, 1 Aug 2024 11:26:30 +0200 Subject: [PATCH] Fix capacity --- src/exercise.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/exercise.rs b/src/exercise.rs index 5cb434bf..605d5f10 100644 --- a/src/exercise.rs +++ b/src/exercise.rs @@ -172,7 +172,7 @@ pub trait RunnableExercise { /// The output is written to the `output` buffer after clearing it. fn run_solution(&self, output: Option<&mut Vec>, target_dir: &Path) -> Result { let name = self.name(); - let mut bin_name = String::with_capacity(name.len()); + let mut bin_name = String::with_capacity(name.len() + 4); bin_name.push_str(name); bin_name.push_str("_sol");