diff --git a/src/dbghelp.rs b/src/dbghelp.rs index 711b53db..a4729ad5 100644 --- a/src/dbghelp.rs +++ b/src/dbghelp.rs @@ -409,8 +409,7 @@ pub fn init() -> Result { // // See https://learn.microsoft.com/cpp/build/reference/pdbpath for an // example of where symbols are usually searched for. - let mut search_path_buf = Vec::new(); - search_path_buf.resize(1024, 0); + let mut search_path_buf = vec![0; 1024]; // Prefill the buffer with the current search path. if DBGHELP.SymGetSearchPathW().unwrap()(