From de6c837d7f516af0f5328dcb08e56d80b0353e46 Mon Sep 17 00:00:00 2001 From: ddidderr Date: Tue, 21 Jul 2026 21:11:10 +0200 Subject: [PATCH] fix(test): use direct zero-filled dictionary probe storage Use vec![0; size] in the local-dictionary allocator probe so the focused Rust tests satisfy the repository's strict clippy configuration. The probe still owns the allocation until the test releases it and production code is unchanged. Test Plan: - git diff --check - ulimit -v 41943040; CARGO_BUILD_JOBS=1 cargo clippy --manifest-path rust/Cargo.toml --all-targets -- -A clippy::manual-bits -D warnings --- rust/src/zstd_compress_dictionary.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/rust/src/zstd_compress_dictionary.rs b/rust/src/zstd_compress_dictionary.rs index 0671d834a..bb99d5dd5 100644 --- a/rust/src/zstd_compress_dictionary.rs +++ b/rust/src/zstd_compress_dictionary.rs @@ -2883,8 +2883,7 @@ mod tests { return ptr::null_mut(); } - let mut allocation = Vec::::with_capacity(size); - allocation.resize(size, 0); + let mut allocation = vec![0u8; size]; let buffer = allocation.as_mut_ptr(); probe.allocation = buffer; probe.allocation_capacity = allocation.capacity();