summaryrefslogtreecommitdiff
path: root/src/rwlock.rs
diff options
context:
space:
mode:
authorMica White <botahamec@outlook.com>2024-05-21 13:17:38 -0400
committerMica White <botahamec@outlook.com>2024-05-21 13:17:38 -0400
commitcb28fb1ff3b5ea71c6fe11956015c7285cb3f3df (patch)
tree780a1357d2e1bfdb044440065f45024d26618972 /src/rwlock.rs
parent801a870467af4059d2abdc67f2899edebb1f6d6c (diff)
read-lock changes
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>(