summaryrefslogtreecommitdiff
path: root/src/rwlock.rs
diff options
context:
space:
mode:
authorBotahamec <botahamec@outlook.com>2024-05-21 13:18:10 -0400
committerBotahamec <botahamec@outlook.com>2024-05-21 13:18:10 -0400
commit6e3aa5182604b30ef75ba5676e9f677cc1d18fe3 (patch)
treed8e23a82c8151c4b49c15f49707d96651764db39 /src/rwlock.rs
parent875d5c4ad6e0c2a78c15476584fc686121b340d3 (diff)
parentc344021797b7e1f8027bd9d1302908f0767e362b (diff)
Merge remote-tracking branch 'origin/0.2' into 0.2
Diffstat (limited to 'src/rwlock.rs')
-rw-r--r--src/rwlock.rs6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/rwlock.rs b/src/rwlock.rs
index 7fb8c7a..40c5a6e 100644
--- a/src/rwlock.rs
+++ b/src/rwlock.rs
@@ -56,7 +56,8 @@ pub struct RwLock<T: ?Sized, R> {
/// that only read access is needed to the data.
///
/// [`LockCollection`]: `crate::LockCollection`
-pub struct ReadLock<'a, T: ?Sized, R>(&'a RwLock<T, R>);
+#[repr(transparent)]
+pub struct ReadLock<T: ?Sized, R>(RwLock<T, R>);
/// Grants write access to an [`RwLock`]
///
@@ -64,7 +65,8 @@ pub struct ReadLock<'a, T: ?Sized, R>(&'a RwLock<T, R>);
/// that write access is needed to the data.
///
/// [`LockCollection`]: `crate::LockCollection`
-pub struct WriteLock<'a, T: ?Sized, R>(&'a RwLock<T, R>);
+#[repr(transparent)]
+pub struct WriteLock<T: ?Sized, R>(RwLock<T, R>);
/// RAII structure that unlocks the shared read access to a [`RwLock`]
pub struct RwLockReadRef<'a, T: ?Sized, R: RawRwLock>(