Skip to content

Commit 6066089

Browse files
committed
Skip setting Send/Sync in non-send mode for UserDataCell
1 parent a8d5f23 commit 6066089

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/userdata/cell.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,9 @@ pub(crate) struct UserDataCell<T> {
132132
value: UnsafeCell<T>,
133133
}
134134

135+
#[cfg(feature = "send")]
135136
unsafe impl<T: Send> Send for UserDataCell<T> {}
137+
#[cfg(feature = "send")]
136138
unsafe impl<T: Send> Sync for UserDataCell<T> {}
137139

138140
impl<T> UserDataCell<T> {

0 commit comments

Comments
 (0)