Skip to content

Commit

Permalink
Update references.rs
Browse files Browse the repository at this point in the history
an -> a
  • Loading branch information
eltociear authored Feb 22, 2024
1 parent 667ffe8 commit 80322df
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/references.rs
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
//! Reimplementations of [`std::ptr::null()`] and [`std::ptr::null_mut()`], with safe code only.
//! Relies on [`crate::transmute`] under the hood.
/// Equivalent to [`std::ptr::null()`], but returns an null reference instead.
/// Equivalent to [`std::ptr::null()`], but returns a null reference instead.
pub fn null<'a, T: 'static>() -> &'a T {
crate::transmute(0usize)
}
/// Equivalent to [`std::ptr::null_mut()`], but returns an mutable null reference instead.
/// Equivalent to [`std::ptr::null_mut()`], but returns a mutable null reference instead.
pub fn null_mut<'a, T: 'static>() -> &'a mut T {
crate::transmute(0usize)
}
Expand Down

0 comments on commit 80322df

Please sign in to comment.