diff options
Diffstat (limited to 'src/collection/ref.rs')
| -rw-r--r-- | src/collection/ref.rs | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/collection/ref.rs b/src/collection/ref.rs index 9e07860..a9fc915 100644 --- a/src/collection/ref.rs +++ b/src/collection/ref.rs @@ -86,11 +86,6 @@ unsafe impl<L: Lockable> Lockable for RefLockCollection<'_, L> { 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); } @@ -98,14 +93,19 @@ unsafe impl<L: Lockable> Lockable for RefLockCollection<'_, L> { unsafe fn guard(&self) -> Self::Guard<'_> { self.data.guard() } +} + +unsafe impl<L: Sharable> Sharable for RefLockCollection<'_, L> { + type ReadGuard<'g> + = L::ReadGuard<'g> + where + Self: 'g; unsafe fn read_guard(&self) -> Self::ReadGuard<'_> { self.data.read_guard() } } -unsafe impl<L: Sharable> Sharable for RefLockCollection<'_, L> {} - impl<L: Debug> Debug for RefLockCollection<'_, L> { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { f.debug_struct(stringify!(RefLockCollection)) |
