Skip setting Send/Sync in non-send mode for UserDataCell

This commit is contained in:
Alex Orlenko
2024-10-30 23:32:13 +00:00
parent a8d5f23818
commit 6066089cc1
+2
View File
@@ -132,7 +132,9 @@ pub(crate) struct UserDataCell<T> {
value: UnsafeCell<T>,
}
#[cfg(feature = "send")]
unsafe impl<T: Send> Send for UserDataCell<T> {}
#[cfg(feature = "send")]
unsafe impl<T: Send> Sync for UserDataCell<T> {}
impl<T> UserDataCell<T> {