From 0140f58043a2a00312d31907253cc718985e1e6c Mon Sep 17 00:00:00 2001 From: Botahamec Date: Fri, 27 Sep 2024 21:48:35 -0400 Subject: More implementations of LockableIntoInner and LockableAsMut --- src/collection/retry.rs | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) (limited to 'src/collection/retry.rs') diff --git a/src/collection/retry.rs b/src/collection/retry.rs index b73788a..7aa4ef4 100644 --- a/src/collection/retry.rs +++ b/src/collection/retry.rs @@ -1,4 +1,6 @@ -use crate::lockable::{Lockable, OwnedLockable, RawLock, Sharable}; +use crate::lockable::{ + Lockable, LockableAsMut, LockableIntoInner, OwnedLockable, RawLock, Sharable, +}; use crate::Keyable; use std::collections::HashSet; @@ -174,6 +176,24 @@ unsafe impl Lockable for RetryingLockCollection { } } +impl LockableAsMut for RetryingLockCollection { + type Inner<'a> = L::Inner<'a> + where + Self: 'a; + + fn as_mut(&mut self) -> Self::Inner<'_> { + self.data.as_mut() + } +} + +impl LockableIntoInner for RetryingLockCollection { + type Inner = L::Inner; + + fn into_inner(self) -> Self::Inner { + self.data.into_inner() + } +} + unsafe impl Sharable for RetryingLockCollection {} unsafe impl OwnedLockable for RetryingLockCollection {} -- cgit v1.2.3