mirror of
https://github.com/uutils/coreutils.git
synced 2026-06-10 15:48:22 -07:00
stdbuf: use .with_capacity for Vec storing searched paths
This commit is contained in:
@@ -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() {
|
||||
|
||||
Reference in New Issue
Block a user