Skip to content

Commit aa95934

Browse files
committed
fix clippy slow_vector_initialization
Should be smaller codegen size
1 parent e151306 commit aa95934

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/dbghelp.rs

+1-2
Original file line numberDiff line numberDiff line change
@@ -409,8 +409,7 @@ pub fn init() -> Result<Init, ()> {
409409
//
410410
// See https://learn.microsoft.com/cpp/build/reference/pdbpath for an
411411
// example of where symbols are usually searched for.
412-
let mut search_path_buf = Vec::new();
413-
search_path_buf.resize(1024, 0);
412+
let mut search_path_buf = vec![0; 1024];
414413

415414
// Prefill the buffer with the current search path.
416415
if DBGHELP.SymGetSearchPathW().unwrap()(

0 commit comments

Comments
 (0)