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/collection/ref.rs | |
| parent | 6514ffc5b33962c98fe9ce8f123edca6c57668d8 (diff) | |
Fix clippy issues
Diffstat (limited to 'src/collection/ref.rs')
| -rw-r--r-- | src/collection/ref.rs | 20 |
1 files changed, 13 insertions, 7 deletions
diff --git a/src/collection/ref.rs b/src/collection/ref.rs index 60abdfa..7c0d40a 100644 --- a/src/collection/ref.rs +++ b/src/collection/ref.rs @@ -26,7 +26,7 @@ fn contains_duplicates(l: &[&dyn RawLock]) -> bool { .any(|window| std::ptr::eq(window[0], window[1])) } -impl<'a, L> AsRef<L> for RefLockCollection<'a, L> { +impl<L> AsRef<L> for RefLockCollection<'_, L> { fn as_ref(&self) -> &L { self.data } @@ -44,7 +44,7 @@ where } } -unsafe impl<'a, L: Lockable + Send + Sync> RawLock for RefLockCollection<'a, L> { +unsafe impl<L: Lockable + Send + Sync> RawLock for RefLockCollection<'_, L> { unsafe fn lock(&self) { for lock in &self.locks { lock.lock(); @@ -78,10 +78,16 @@ unsafe impl<'a, L: Lockable + Send + Sync> RawLock for RefLockCollection<'a, L> } } -unsafe impl<'c, L: Lockable> Lockable for RefLockCollection<'c, L> { - type Guard<'g> = L::Guard<'g> where Self: 'g; +unsafe impl<L: Lockable> Lockable for RefLockCollection<'_, L> { + type Guard<'g> + = L::Guard<'g> + where + Self: 'g; - type ReadGuard<'g> = L::ReadGuard<'g> where Self: 'g; + type ReadGuard<'g> + = L::ReadGuard<'g> + where + Self: 'g; fn get_ptrs<'a>(&'a self, ptrs: &mut Vec<&'a dyn RawLock>) { ptrs.extend_from_slice(&self.locks); @@ -96,9 +102,9 @@ unsafe impl<'c, L: Lockable> Lockable for RefLockCollection<'c, L> { } } -unsafe impl<'c, L: Sharable> Sharable for RefLockCollection<'c, L> {} +unsafe impl<L: Sharable> Sharable for RefLockCollection<'_, L> {} -impl<'a, L: Debug> Debug for RefLockCollection<'a, L> { +impl<L: Debug> Debug for RefLockCollection<'_, L> { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { f.debug_struct(stringify!(RefLockCollection)) .field("data", self.data) |
