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/owned.rs | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'src/collection/owned.rs') diff --git a/src/collection/owned.rs b/src/collection/owned.rs index 2b6e974..f2b6cc9 100644 --- a/src/collection/owned.rs +++ b/src/collection/owned.rs @@ -1,6 +1,6 @@ use std::marker::PhantomData; -use crate::lockable::{Lockable, OwnedLockable, RawLock, Sharable}; +use crate::lockable::{Lockable, LockableIntoInner, OwnedLockable, RawLock, Sharable}; use crate::Keyable; use super::{utils, LockGuard, OwnedLockCollection}; @@ -69,6 +69,14 @@ unsafe impl Lockable for OwnedLockCollection { } } +impl LockableIntoInner for OwnedLockCollection { + type Inner = L::Inner; + + fn into_inner(self) -> Self::Inner { + self.data.into_inner() + } +} + unsafe impl Sharable for OwnedLockCollection {} unsafe impl OwnedLockable for OwnedLockCollection {} -- cgit v1.2.3