diff options
| author | Mica White <botahamec@gmail.com> | 2024-12-25 11:19:24 -0500 |
|---|---|---|
| committer | Mica White <botahamec@gmail.com> | 2024-12-25 11:23:15 -0500 |
| commit | 3cf1224ccbff36d03e1e210e041eeb29cdfde02b (patch) | |
| tree | 81f40085751f3392c1d0ec39f7bbaf1cb02305cc /src/collection/ref.rs | |
| parent | cf525cfd70bfacdd731eb7846fa5563156c7fbb6 (diff) | |
Send and Sync for RefLockCollection
Diffstat (limited to 'src/collection/ref.rs')
| -rw-r--r-- | src/collection/ref.rs | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/collection/ref.rs b/src/collection/ref.rs index 1f19e4d..9e07860 100644 --- a/src/collection/ref.rs +++ b/src/collection/ref.rs @@ -114,6 +114,11 @@ impl<L: Debug> Debug for RefLockCollection<'_, L> { } } +// safety: the RawLocks must be send because they come from the Send Lockable +#[allow(clippy::non_send_fields_in_send_ty)] +unsafe impl<L: Send> Send for RefLockCollection<'_, L> {} +unsafe impl<L: Sync> Sync for RefLockCollection<'_, L> {} + impl<'a, L: OwnedLockable + Default> From<&'a L> for RefLockCollection<'a, L> { fn from(value: &'a L) -> Self { Self::new(value) |
