1
0
mirror of https://github.com/rust-lang/rustlings.git synced 2024-09-16 10:51:42 +02:00

Fix capacity

This commit is contained in:
mo8it 2024-08-01 11:26:30 +02:00
parent 766f3c50ec
commit 455d87cadd

View File

@ -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<u8>>, target_dir: &Path) -> Result<bool> {
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");