From fb19ebde1729e42c7fd90f63149d1732d5bb2610 Mon Sep 17 00:00:00 2001 From: laizy Date: Fri, 8 Nov 2019 16:56:55 +0800 Subject: [PATCH] add `Sync` constraint for RwLock to prevent memory unsafety (#479) --- src/sync/rwlock.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sync/rwlock.rs b/src/sync/rwlock.rs index 65b9dca..e042bbd 100644 --- a/src/sync/rwlock.rs +++ b/src/sync/rwlock.rs @@ -57,7 +57,7 @@ pub struct RwLock { } unsafe impl Send for RwLock {} -unsafe impl Sync for RwLock {} +unsafe impl Sync for RwLock {} impl RwLock { /// Creates a new reader-writer lock.