make GenerationalBoxId send and sync

This commit is contained in:
Evan Almloff committed 2023-11-06 18:57:55 -06:00
1 parent 7daa945ae3
commit 4e19f8f2be
1 file changed
+4
+4
View File
@@ -150,6 +150,10 @@ pub struct GenerationalBoxId {
generation: u32,
}
// Safety: GenerationalBoxId is Send and Sync because there is no way to access the pointer.
unsafe impl Send for GenerationalBoxId {}
unsafe impl Sync for GenerationalBoxId {}
impl Debug for GenerationalBoxId {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
#[cfg(any(debug_assertions, feature = "check_generation"))]