We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents b3210fd + 7a6acb9 commit a3214b4Copy full SHA for a3214b4
src/containers/storage/heap.rs
@@ -32,6 +32,9 @@ pub struct Heap<T> {
32
_marker: PhantomData<T>,
33
}
34
35
+// SAFETY: `Heap<T>` can be sent to another thread if `T` can be sent to another thread. It's because we use system allocation which is send-safe.
36
+unsafe impl<T: Send> Send for Heap<T> {}
37
+
38
impl<T> Heap<T> {
39
fn layout(capacity: u32) -> Option<Layout> {
40
(capacity as usize)
0 commit comments