Skip to content

Commit 731f6bc

Browse files
author
sarah
committed
impl Send/Sync for SmallVec
1 parent 741ab83 commit 731f6bc

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/lib.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -293,6 +293,9 @@ pub struct SmallVec<T, const N: usize> {
293293
_marker: PhantomData<T>,
294294
}
295295

296+
unsafe impl<T: Send, const N: usize> Send for SmallVec<T, N> {}
297+
unsafe impl<T: Sync, const N: usize> Sync for SmallVec<T, N> {}
298+
296299
/// An iterator that removes the items from a `SmallVec` and yields them by value.
297300
///
298301
/// Returned from [`SmallVec::drain`][1].

0 commit comments

Comments
 (0)