summaryrefslogtreecommitdiff
path: root/src/collection/owned.rs
diff options
context:
space:
mode:
authorBotahamec <botahamec@outlook.com>2024-09-27 21:48:35 -0400
committerBotahamec <botahamec@outlook.com>2024-09-27 21:48:35 -0400
commit0140f58043a2a00312d31907253cc718985e1e6c (patch)
tree7fda6116272523ef18182d44de63110be0a77f30 /src/collection/owned.rs
parentf3882eb6e4640572fc11a65ad6d450f058392403 (diff)
More implementations of LockableIntoInner and LockableAsMut
Diffstat (limited to 'src/collection/owned.rs')
-rw-r--r--src/collection/owned.rs10
1 files changed, 9 insertions, 1 deletions
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<L: Lockable> Lockable for OwnedLockCollection<L> {
}
}
+impl<L: LockableIntoInner> LockableIntoInner for OwnedLockCollection<L> {
+ type Inner = L::Inner;
+
+ fn into_inner(self) -> Self::Inner {
+ self.data.into_inner()
+ }
+}
+
unsafe impl<L: Sharable> Sharable for OwnedLockCollection<L> {}
unsafe impl<L: OwnedLockable> OwnedLockable for OwnedLockCollection<L> {}