diff --git a/bucket_map/src/bucket_storage.rs b/bucket_map/src/bucket_storage.rs index a8e9b953a33281..89a41fbee86197 100644 --- a/bucket_map/src/bucket_storage.rs +++ b/bucket_map/src/bucket_storage.rs @@ -190,13 +190,13 @@ impl BucketStorage { unsafe { slice.get_unchecked_mut(0) } } - pub(crate) fn get_mut_from_parts(item_slice: &mut [u8]) -> &mut T { + pub(crate) fn get_mut_from_parts(item_slice: &mut [u8]) -> &mut T { debug_assert!(std::mem::size_of::() <= item_slice.len()); let item = item_slice.as_mut_ptr() as *mut T; unsafe { &mut *item } } - pub(crate) fn get_from_parts(item_slice: &[u8]) -> &T { + pub(crate) fn get_from_parts(item_slice: &[u8]) -> &T { debug_assert!(std::mem::size_of::() <= item_slice.len()); let item = item_slice.as_ptr() as *const T; unsafe { &*item }