diff options
| author | Botahamec <botahamec@outlook.com> | 2024-05-22 20:59:09 -0400 |
|---|---|---|
| committer | Botahamec <botahamec@outlook.com> | 2024-05-22 20:59:09 -0400 |
| commit | 878f4fae4d3c6e64ab3824bf3fc012fbb5293a21 (patch) | |
| tree | f6550c400decbc1805c5957460177380d7c94718 /src/mutex | |
| parent | 1ed88daa00d478472181f0987112a2b0f2266694 (diff) | |
Documentation
Diffstat (limited to 'src/mutex')
| -rw-r--r-- | src/mutex/guard.rs | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/mutex/guard.rs b/src/mutex/guard.rs index 35fe1f2..9e8e2e6 100644 --- a/src/mutex/guard.rs +++ b/src/mutex/guard.rs @@ -61,7 +61,9 @@ impl<'a, T: ?Sized + 'a, R: RawMutex> AsMut<T> for MutexRef<'a, T, R> { } impl<'a, T: ?Sized + 'a, R: RawMutex> MutexRef<'a, T, R> { - pub unsafe fn new(mutex: &'a Mutex<T, R>) -> Self { + /// Creates a reference to the underlying data of a mutex without + /// attempting to lock it or take ownership of the key. + pub(crate) unsafe fn new(mutex: &'a Mutex<T, R>) -> Self { Self(mutex, PhantomData) } } |
