summaryrefslogtreecommitdiff
path: root/src/rwlock/read_guard.rs
diff options
context:
space:
mode:
authorBotahamec <botahamec@outlook.com>2024-05-22 21:02:37 -0400
committerBotahamec <botahamec@outlook.com>2024-05-22 21:02:37 -0400
commitfa39064fe2f3399d27762a23c54d4703d00bd199 (patch)
treea6da67d0f7808fdecf56568e1741ec3189c9a24f /src/rwlock/read_guard.rs
parent878f4fae4d3c6e64ab3824bf3fc012fbb5293a21 (diff)
must use
Diffstat (limited to 'src/rwlock/read_guard.rs')
-rw-r--r--src/rwlock/read_guard.rs1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/rwlock/read_guard.rs b/src/rwlock/read_guard.rs
index e46078c..1eb8bfc 100644
--- a/src/rwlock/read_guard.rs
+++ b/src/rwlock/read_guard.rs
@@ -48,6 +48,7 @@ impl<'a, T: ?Sized + 'a, R: RawRwLock> Drop for RwLockReadRef<'a, T, R> {
impl<'a, T: ?Sized + 'a, R: RawRwLock> RwLockReadRef<'a, T, R> {
/// Creates an immutable reference for the underlying data of an [`RwLock`]
/// without locking it or taking ownership of the key.
+ #[must_use]
pub(crate) unsafe fn new(mutex: &'a RwLock<T, R>) -> Self {
Self(mutex, PhantomData)
}