Skip to content

Commit 8ab3c8b

Browse files
committed
removed an invalid safety comment
1 parent aace15e commit 8ab3c8b

File tree

1 file changed

+0
-4
lines changed

1 file changed

+0
-4
lines changed

zeroize/src/lib.rs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -805,10 +805,6 @@ unsafe fn volatile_set<T: Copy + Sized>(dst: *mut T, src: T, count: usize) {
805805
#[inline(always)]
806806
pub unsafe fn zeroize_flat_type<T: Sized>(data: *mut T) {
807807
let size = mem::size_of::<T>();
808-
// Safety:
809-
//
810-
// This is safe because `mem::size_of<T>()` returns the exact size of the object in memory, and
811-
// `data_ptr` points directly to the first byte of the data.
812808
volatile_set(data as *mut u8, 0, size);
813809
atomic_fence()
814810
}

0 commit comments

Comments
 (0)