summaryrefslogtreecommitdiff
path: root/src/rwlock/read_guard.rs
diff options
context:
space:
mode:
authorMica White <botahamec@outlook.com>2024-03-11 22:41:13 -0400
committerMica White <botahamec@outlook.com>2024-03-11 22:41:13 -0400
commita22ffadbebddcbec9bb127b295f8a8516174e6e6 (patch)
tree66925b072f43646aafb40834e293c11b98f08c87 /src/rwlock/read_guard.rs
parentef34f899313ed4e4c5e452aef2c670f7d51f1ca9 (diff)
More trait bound fixes
Diffstat (limited to 'src/rwlock/read_guard.rs')
-rw-r--r--src/rwlock/read_guard.rs12
1 files changed, 3 insertions, 9 deletions
diff --git a/src/rwlock/read_guard.rs b/src/rwlock/read_guard.rs
index 074b0a9..1fbbceb 100644
--- a/src/rwlock/read_guard.rs
+++ b/src/rwlock/read_guard.rs
@@ -42,19 +42,13 @@ impl<'a, 'key: 'a, T: ?Sized + 'a, Key: Keyable, R: RawRwLock>
/// Create a guard to the given mutex. Undefined if multiple guards to the
/// same mutex exist at once.
#[must_use]
- pub(super) const unsafe fn new(rwlock: &'a RwLock<T, R>, thread_key: Key) -> Self {
+ pub(super) unsafe fn new(rwlock: &'a RwLock<T, R>, thread_key: Key) -> Self {
Self {
- rwlock: RwLockReadRef(rwlock),
+ rwlock: RwLockReadRef(rwlock, PhantomData),
thread_key,
_phantom1: PhantomData,
- _phantom2: PhantomData,
}
}
}
-unsafe impl<'a, T: ?Sized + 'a, R: RawRwLock> Sync for RwLockReadRef<'a, T, R> {}
-
-unsafe impl<'a, 'key: 'a, T: ?Sized + 'a, Key: Keyable, R: RawRwLock> Sync
- for RwLockReadGuard<'a, 'key, T, Key, R>
-{
-}
+unsafe impl<'a, T: ?Sized + Sync + 'a, R: RawRwLock + Sync + 'a> Sync for RwLockReadRef<'a, T, R> {}