From 3cf1224ccbff36d03e1e210e041eeb29cdfde02b Mon Sep 17 00:00:00 2001 From: Mica White Date: Wed, 25 Dec 2024 11:19:24 -0500 Subject: Send and Sync for RefLockCollection --- src/collection/ref.rs | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src') 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 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 Send for RefLockCollection<'_, L> {} +unsafe impl 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) -- cgit v1.2.3