From aa95934c312e6d3266b50244d1a53f4ce59fba8f Mon Sep 17 00:00:00 2001 From: klensy Date: Sat, 4 May 2024 13:45:18 +0300 Subject: [PATCH] fix clippy slow_vector_initialization Should be smaller codegen size --- src/dbghelp.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) 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()(