From ec1462fcabdace5ad9fcf86b784ca8ceb57b464b Mon Sep 17 00:00:00 2001 From: "Jorge C. Leitao" Date: Thu, 2 Sep 2021 10:37:24 +0000 Subject: [PATCH] Added Send+Sync to MutableBuffer. --- src/buffer/mutable.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/buffer/mutable.rs b/src/buffer/mutable.rs index 7d6cc0b5c73..9df74115723 100644 --- a/src/buffer/mutable.rs +++ b/src/buffer/mutable.rs @@ -623,3 +623,8 @@ impl MutableBuffer { MutableBuffer::from_trusted_len_iter_unchecked(iter).into() } } + +// This is sound because `NativeType` is `Send+Sync`, and +// `MutableBuffer` has the invariants of `Vec` (which is `Send+Sync`) +unsafe impl Send for MutableBuffer {} +unsafe impl Sync for MutableBuffer {}