summaryrefslogtreecommitdiff
path: root/src/rwlock/write_guard.rs
diff options
context:
space:
mode:
authorBotahamec <botahamec@outlook.com>2024-05-22 20:59:09 -0400
committerBotahamec <botahamec@outlook.com>2024-05-22 20:59:09 -0400
commit878f4fae4d3c6e64ab3824bf3fc012fbb5293a21 (patch)
treef6550c400decbc1805c5957460177380d7c94718 /src/rwlock/write_guard.rs
parent1ed88daa00d478472181f0987112a2b0f2266694 (diff)
Documentation
Diffstat (limited to 'src/rwlock/write_guard.rs')
-rw-r--r--src/rwlock/write_guard.rs4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/rwlock/write_guard.rs b/src/rwlock/write_guard.rs
index c8dd58b..ec622d7 100644
--- a/src/rwlock/write_guard.rs
+++ b/src/rwlock/write_guard.rs
@@ -48,7 +48,9 @@ impl<'a, T: ?Sized + 'a, R: RawRwLock> Drop for RwLockWriteRef<'a, T, R> {
}
impl<'a, T: ?Sized + 'a, R: RawRwLock> RwLockWriteRef<'a, T, R> {
- pub unsafe fn new(mutex: &'a RwLock<T, R>) -> Self {
+ /// Creates a reference to the underlying data of an [`RwLock`] without
+ /// locking or taking ownership of the key.
+ pub(crate) unsafe fn new(mutex: &'a RwLock<T, R>) -> Self {
Self(mutex, PhantomData)
}
}