aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJordan Bracco <href@random.sh>2021-11-12 16:51:06 +0100
committerJordan Bracco <href@random.sh>2021-11-12 16:51:06 +0100
commit6a443b0b844baf6b9c8812ffb11d722c9ce76177 (patch)
tree2db2ec033c592f44f9c9d8d4f9020211df8dda2e
parentthx clippy (diff)
tree_bitmap: apply https://github.com/hroi/treebitmap/pull/20
-rw-r--r--native/treebitmap_nif/src/tree_bitmap/allocator.rs5
1 files changed, 1 insertions, 4 deletions
diff --git a/native/treebitmap_nif/src/tree_bitmap/allocator.rs b/native/treebitmap_nif/src/tree_bitmap/allocator.rs
index 66b7cf3..771a449 100644
--- a/native/treebitmap_nif/src/tree_bitmap/allocator.rs
+++ b/native/treebitmap_nif/src/tree_bitmap/allocator.rs
@@ -190,10 +190,7 @@ impl<T: Sized> BucketVec<T> {
(self.spacing - index - 1) as usize,
);
if cfg!(debug_assertions) {
- ptr::write(
- dst_ptr.offset((self.spacing - index - 1) as isize),
- mem::zeroed(),
- );
+ ptr::write_bytes(dst_ptr.offset((self.spacing - index - 1) as isize), 0, 1);
}
}
ret