Skip to content

Commit

Permalink
Update references.rs (#24)
Browse files Browse the repository at this point in the history
an -> a
  • Loading branch information
Creative0708 authored Feb 22, 2024
2 parents 667ffe8 + 80322df commit 21e6c25
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 21e6c25

Please sign in to comment.