From ebbe3cfce28914d776f3e5f89894fab50911c57e Mon Sep 17 00:00:00 2001 From: Botahamec Date: Wed, 22 May 2024 15:53:49 -0400 Subject: Implemented necessary traits --- src/collection.rs | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'src/collection.rs') diff --git a/src/collection.rs b/src/collection.rs index 6623c8a..a84c1ce 100644 --- a/src/collection.rs +++ b/src/collection.rs @@ -8,6 +8,7 @@ mod owned; mod r#ref; mod retry; +#[derive(Debug)] pub struct OwnedLockCollection { data: L, } @@ -17,12 +18,16 @@ pub struct OwnedLockCollection { /// This could be a tuple of [`Lockable`] types, an array, or a `Vec`. But it /// can be safely locked without causing a deadlock. pub struct RefLockCollection<'a, L> { - locks: Vec<&'a dyn Lock>, data: &'a L, + locks: Vec<&'a dyn Lock>, } -pub struct BoxedLockCollection<'a, L: 'a>(RefLockCollection<'a, L>); +pub struct BoxedLockCollection { + data: Box, + locks: Vec<&'static dyn Lock>, +} +#[derive(Debug)] pub struct RetryingLockCollection { data: L, } -- cgit v1.2.3