781: Mark BufferMappedRange Send/Sync on native r=kvark a=cwfitzgerald

This fixes an issue reported on the matrix where this was causing things to unnecessarily be !Send. There's no reason I can see that this couldn't be Send/Sync as we only use it like one would a slice. We might also consider backporting this to 0.7.

Co-authored-by: Connor Fitzgerald <connorwadefitzgerald@gmail.com>
This commit is contained in:
bors[bot]andConnor Fitzgerald authored and GitHub committed 2021-03-04 05:11:32 +00:00
commit cadc2df8a1
1 file changed
+3
+3
View File
@@ -1910,6 +1910,9 @@ pub struct BufferMappedRange {
size: usize,
}
unsafe impl Send for BufferMappedRange {}
unsafe impl Sync for BufferMappedRange {}
impl crate::BufferMappedRangeSlice for BufferMappedRange {
fn slice(&self) -> &[u8] {
unsafe { slice::from_raw_parts(self.ptr, self.size) }