diff options
| author | Botahamec <botahamec@outlook.com> | 2024-05-21 13:39:57 -0400 |
|---|---|---|
| committer | Botahamec <botahamec@outlook.com> | 2024-05-21 13:39:57 -0400 |
| commit | a4625296cb98a68a590ae1aa78b07f190a850f37 (patch) | |
| tree | 01487106e65b1cde4f8dda2f35f2300d9a105429 /src/rwlock.rs | |
| parent | 6e3aa5182604b30ef75ba5676e9f677cc1d18fe3 (diff) | |
fix errors
Diffstat (limited to 'src/rwlock.rs')
| -rw-r--r-- | src/rwlock.rs | 6 |
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>( |
