diff --git a/src/uu/stdbuf/src/stdbuf.rs b/src/uu/stdbuf/src/stdbuf.rs index 60a7206a6..f8927967d 100644 --- a/src/uu/stdbuf/src/stdbuf.rs +++ b/src/uu/stdbuf/src/stdbuf.rs @@ -154,7 +154,7 @@ fn get_preload_env(_tmp_dir: &TempDir) -> UResult<(String, PathBuf)> { // Search paths in order: // 1. Directory where stdbuf is located (program_path) // 2. Compile-time directory from LIBSTDBUF_DIR - let mut search_paths: Vec = Vec::new(); + let mut search_paths: Vec = Vec::with_capacity(2); // First, try to get the directory where stdbuf is running from if let Ok(exe_path) = std::env::current_exe() {