stdbuf: use .with_capacity for Vec storing searched paths

This commit is contained in:
oech3
2026-03-30 14:27:10 +02:00
committed by Daniel Hofstetter
parent d41a16f7fd
commit 4b2e84de2d
+1 -1
View File
@@ -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<PathBuf> = Vec::new();
let mut search_paths: Vec<PathBuf> = Vec::with_capacity(2);
// First, try to get the directory where stdbuf is running from
if let Ok(exe_path) = std::env::current_exe() {