add `Sync` constraint for RwLock to prevent memory unsafety (#479)

poc-serde-support
laizy 5 years ago committed by Stjepan Glavina
parent ab2f64cd84
commit fb19ebde17

@ -57,7 +57,7 @@ pub struct RwLock<T> {
} }
unsafe impl<T: Send> Send for RwLock<T> {} unsafe impl<T: Send> Send for RwLock<T> {}
unsafe impl<T: Send> Sync for RwLock<T> {} unsafe impl<T: Send + Sync> Sync for RwLock<T> {}
impl<T> RwLock<T> { impl<T> RwLock<T> {
/// Creates a new reader-writer lock. /// Creates a new reader-writer lock.

Loading…
Cancel
Save