From 4ba03be97e6cc7e790bbc9bfc18caaa228c8a262 Mon Sep 17 00:00:00 2001 From: Botahamec Date: Fri, 28 Feb 2025 16:09:11 -0500 Subject: Scoped lock API --- src/collection.rs | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'src/collection.rs') diff --git a/src/collection.rs b/src/collection.rs index db68382..e50cc30 100644 --- a/src/collection.rs +++ b/src/collection.rs @@ -1,7 +1,6 @@ use std::cell::UnsafeCell; -use std::marker::PhantomData; -use crate::{key::Keyable, lockable::RawLock}; +use crate::{lockable::RawLock, ThreadKey}; mod boxed; mod guard; @@ -122,8 +121,7 @@ pub struct RetryingLockCollection { /// A RAII guard for a generic [`Lockable`] type. /// /// [`Lockable`]: `crate::lockable::Lockable` -pub struct LockGuard<'key, Guard, Key: Keyable + 'key> { +pub struct LockGuard { guard: Guard, - key: Key, - _phantom: PhantomData<&'key ()>, + key: ThreadKey, } -- cgit v1.2.3