Skip to content

Commit edbe331

Browse files
committed
Switch Sync impl from ArrayParts to ArrayRef
1 parent f5b6f5e commit edbe331

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

src/arraytraits.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -433,6 +433,12 @@ where
433433
{
434434
}
435435

436+
unsafe impl<A,D> Sync for ArrayRef<A,D>
437+
where
438+
A: Sync,
439+
{
440+
}
441+
436442
#[cfg(feature = "serde")]
437443
#[cfg_attr(docsrs, doc(cfg(feature = "serde")))]
438444
// Use version number so we can add a packed format later.

src/lib.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1322,8 +1322,6 @@ struct ArrayParts<A, D, T: ?Sized>
13221322
_dst_control: T,
13231323
}
13241324

1325-
unsafe impl<A, D, T: ?Sized> Sync for ArrayParts<A, D, T> where A: Sync {}
1326-
13271325
type ArrayPartsSized<A, D> = ArrayParts<A, D, [usize; 0]>;
13281326
type ArrayPartsUnsized<A, D> = ArrayParts<A, D, [usize]>;
13291327

0 commit comments

Comments
 (0)