diff --git a/score/containers_rust/storage/heap.rs b/score/containers_rust/storage/heap.rs index 034d4ef780..e106cd6855 100644 --- a/score/containers_rust/storage/heap.rs +++ b/score/containers_rust/storage/heap.rs @@ -35,6 +35,9 @@ pub struct Heap { // SAFETY: `Heap` can be sent to another thread if `T` can be sent to another thread and used allocator is send-safe. unsafe impl Send for Heap {} +// SAFETY: `Heap` can be shared across threads if `T` can be shared across threads and the used allocator is share-safe. +unsafe impl Sync for Heap {} + impl Heap { fn layout(capacity: u32) -> Option { (capacity as usize)