Skip to content

Commit 9b1cca6

Browse files
Update non_null.rs
1 parent 17d509e commit 9b1cca6

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

library/core/src/ptr/non_null.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1774,9 +1774,9 @@ impl<T: ?Sized> From<&mut T> for NonNull<T> {
17741774
#[inline]
17751775
fn from(reference: &mut T) -> Self {
17761776
// SAFETY: A mutable reference cannot be null.
1777-
unsafe { NonNull { pointer: reference as *mut T } }
1777+
unsafe { NonNull { pointer: reference as *mut T } }
17781778
}
1779-
}
1779+
}
17801780

17811781
#[stable(feature = "nonnull", since = "1.25.0")]
17821782
impl<T: ?Sized> From<&T> for NonNull<T> {
@@ -1786,7 +1786,7 @@ impl<T: ?Sized> From<&T> for NonNull<T> {
17861786
#[inline]
17871787
fn from(reference: &T) -> Self {
17881788
// SAFETY: A reference cannot be null.
1789-
unsafe { NonNull { pointer: reference as *const T } }
1789+
unsafe { NonNull { pointer: reference as *const T } }
17901790
}
17911791
}
17921792

0 commit comments

Comments
 (0)