summaryrefslogtreecommitdiff
path: root/src/rwlock.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/rwlock.rs')
-rw-r--r--src/rwlock.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/rwlock.rs b/src/rwlock.rs
index 40c5a6e..8f1ba8f 100644
--- a/src/rwlock.rs
+++ b/src/rwlock.rs
@@ -22,7 +22,7 @@ pub type ParkingRwLock<T> = RwLock<T, parking_lot::RawRwLock>;
/// A reader-writer lock
///
/// This type of lock allows a number of readers or at most one writer at any
-/// point in time. The write portion of thislock typically allows modification
+/// point in time. The write portion of this lock typically allows modification
/// of the underlying data (exclusive access) and the read portion of this lock
/// typically allows for read-only access (shared access).
///
@@ -57,7 +57,7 @@ pub struct RwLock<T: ?Sized, R> {
///
/// [`LockCollection`]: `crate::LockCollection`
#[repr(transparent)]
-pub struct ReadLock<T: ?Sized, R>(RwLock<T, R>);
+pub struct ReadLock<'l, T: ?Sized, R>(&'l RwLock<T, R>);
/// Grants write access to an [`RwLock`]
///
@@ -66,7 +66,7 @@ pub struct ReadLock<T: ?Sized, R>(RwLock<T, R>);
///
/// [`LockCollection`]: `crate::LockCollection`
#[repr(transparent)]
-pub struct WriteLock<T: ?Sized, R>(RwLock<T, R>);
+pub struct WriteLock<'l, T: ?Sized, R>(&'l RwLock<T, R>);
/// RAII structure that unlocks the shared read access to a [`RwLock`]
pub struct RwLockReadRef<'a, T: ?Sized, R: RawRwLock>(