summaryrefslogtreecommitdiff
path: root/src/collection.rs
diff options
context:
space:
mode:
authorBotahamec <botahamec@outlook.com>2025-02-28 16:09:11 -0500
committerBotahamec <botahamec@outlook.com>2025-02-28 16:09:11 -0500
commit4ba03be97e6cc7e790bbc9bfc18caaa228c8a262 (patch)
treea257184577a93ddf240aba698755c2886188788b /src/collection.rs
parent4a5ec04a29cba07c5960792528bd66b0f99ee3ee (diff)
Scoped lock API
Diffstat (limited to 'src/collection.rs')
-rw-r--r--src/collection.rs8
1 files changed, 3 insertions, 5 deletions
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<L> {
/// 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: Guard,
- key: Key,
- _phantom: PhantomData<&'key ()>,
+ key: ThreadKey,
}