diff options
| author | Botahamec <botahamec@outlook.com> | 2024-12-20 18:28:08 -0500 |
|---|---|---|
| committer | Botahamec <botahamec@outlook.com> | 2024-12-20 18:28:08 -0500 |
| commit | 85dd2106bdc3476c0eb73c97f2f4b338a3486749 (patch) | |
| tree | 096e5fd71a67949bbf45a0e79f2357d64acb96d6 /src/rwlock/read_lock.rs | |
| parent | 6514ffc5b33962c98fe9ce8f123edca6c57668d8 (diff) | |
Fix clippy issues
Diffstat (limited to 'src/rwlock/read_lock.rs')
| -rw-r--r-- | src/rwlock/read_lock.rs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/rwlock/read_lock.rs b/src/rwlock/read_lock.rs index 4f2bc86..c5c4c8c 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<'l, T: ?Sized + Debug, R: RawRwLock> Debug for ReadLock<'l, T, R> { +impl<T: ?Sized + Debug, R: RawRwLock> Debug for ReadLock<'_, 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<'l, T: ?Sized, R> AsRef<RwLock<T, R>> for ReadLock<'l, T, R> { +impl<T: ?Sized, R> AsRef<RwLock<T, R>> for ReadLock<'_, T, R> { fn as_ref(&self) -> &RwLock<T, R> { self.0 } @@ -57,13 +57,13 @@ impl<'l, T, R> ReadLock<'l, T, R> { } } -impl<'l, T: ?Sized, R: RawRwLock> ReadLock<'l, T, R> { +impl<T: ?Sized, R: RawRwLock> ReadLock<'_, T, R> { /// Locks the underlying [`RwLock`] with shared read access, blocking the /// current thread until it can be acquired. pub fn lock<'s, 'key: 's, Key: Keyable + 'key>( &'s self, key: Key, - ) -> RwLockReadGuard<'_, 'key, T, Key, R> { + ) -> RwLockReadGuard<'s, 'key, T, Key, R> { self.0.read(key) } @@ -72,7 +72,7 @@ impl<'l, T: ?Sized, R: RawRwLock> ReadLock<'l, T, R> { pub fn try_lock<'s, 'key: 's, Key: Keyable + 'key>( &'s self, key: Key, - ) -> Option<RwLockReadGuard<'_, 'key, T, Key, R>> { + ) -> Option<RwLockReadGuard<'s, 'key, T, Key, R>> { self.0.try_read(key) } |
