diff --git a/fish-rust/src/env/environment_impl.rs b/fish-rust/src/env/environment_impl.rs index 03c95804b..ec83ff011 100644 --- a/fish-rust/src/env/environment_impl.rs +++ b/fish-rust/src/env/environment_impl.rs @@ -647,8 +647,7 @@ impl EnvScopedImpl { ); // Construct the export list: a list of strings of the form key=value. - let mut export_list: Vec = Vec::new(); - export_list.reserve(vals.len()); + let mut export_list: Vec = Vec::with_capacity(vals.len()); for (key, val) in vals.into_iter() { let mut str = key; str.push('=');