Skip to content

Commit

Permalink
Fixup SAFETY comment
Browse files Browse the repository at this point in the history
  • Loading branch information
tarcieri committed Jan 11, 2024
1 parent 8a89f17 commit 1e56a38
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/from_fn.rs
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ impl<T> Drop for Guard<'_, T> {
fn drop(&mut self) {
debug_assert!(self.initialized <= self.array_mut.len());

// SAFETY: the slice will only contain initialized items
// SAFETY: the loop only iterates over initialized items
unsafe {
let p: *mut T = self.array_mut.as_mut_ptr().cast();

Expand Down

0 comments on commit 1e56a38

Please sign in to comment.