diff options
| author | Botahamec <botahamec@outlook.com> | 2024-05-21 14:48:46 -0400 |
|---|---|---|
| committer | Botahamec <botahamec@outlook.com> | 2024-05-21 14:48:46 -0400 |
| commit | cf49f2900fe3c7abd1bbadacfdc745d6b5bbc235 (patch) | |
| tree | a3b4000f0533ae61d4fa53380641f7f9a896bd49 /src/rwlock/read_lock.rs | |
| parent | a4625296cb98a68a590ae1aa78b07f190a850f37 (diff) | |
Fix the Dining Philosophers Problem
Diffstat (limited to 'src/rwlock/read_lock.rs')
| -rw-r--r-- | src/rwlock/read_lock.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/rwlock/read_lock.rs b/src/rwlock/read_lock.rs index 011bd8c..29042b5 100644 --- a/src/rwlock/read_lock.rs +++ b/src/rwlock/read_lock.rs @@ -6,7 +6,7 @@ use crate::key::Keyable; use super::{ReadLock, RwLock, RwLockReadGuard, RwLockReadRef}; -impl<T: ?Sized + Debug, R: RawRwLock> Debug for ReadLock<T, R> { +impl<'l, T: ?Sized + Debug, R: RawRwLock> Debug for ReadLock<'l, T, R> { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { // safety: this is just a try lock, and the value is dropped // immediately after, so there's no risk of blocking ourselves @@ -34,7 +34,7 @@ impl<'l, T, R> From<&'l RwLock<T, R>> for ReadLock<'l, T, R> { } } -impl<T: ?Sized, R> AsRef<RwLock<T, R>> for ReadLock<T, R> { +impl<'l, T: ?Sized, R> AsRef<RwLock<T, R>> for ReadLock<'l, T, R> { fn as_ref(&self) -> &RwLock<T, R> { &self.0 } |
