diff options
Diffstat (limited to 'ecs/src/lock.rs')
-rw-r--r-- | ecs/src/lock.rs | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/ecs/src/lock.rs b/ecs/src/lock.rs index b3c9f57..77213c9 100644 --- a/ecs/src/lock.rs +++ b/ecs/src/lock.rs @@ -57,6 +57,13 @@ where Ok(WriteGuard { inner: guard }) } + + pub fn into_inner(self) -> Value + { + self.inner + .into_inner() + .unwrap_or_else(|err| err.into_inner()) + } } #[derive(Debug, thiserror::Error)] |