We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
Send
Sync
Array
1 parent 600e0c7 commit cdbc860Copy full SHA for cdbc860
src/lib.rs
@@ -560,6 +560,14 @@ where
560
}
561
562
563
+// SAFETY: `Array` is a `repr(transparent)` newtype for `[T; N]`, so as long as `T: Send` it should
564
+// also be `Send`.
565
+unsafe impl<T, U: ArraySize> Send for Array<T, U> where T: Send {}
566
+
567
+// SAFETY: `Array` is a `repr(transparent)` newtype for `[T; N]`, so as long as `T: Sync` it should
568
+// also be `Sync`.
569
+unsafe impl<T, U: ArraySize> Sync for Array<T, U> where T: Sync {}
570
571
impl<'a, T, U> TryFrom<&'a [T]> for Array<T, U>
572
where
573
Self: Clone,
0 commit comments