summaryrefslogtreecommitdiff
path: root/ecs/src/lock.rs
diff options
context:
space:
mode:
authorHampusM <hampus@hampusmat.com>2024-08-11 21:48:31 +0200
committerHampusM <hampus@hampusmat.com>2024-08-12 19:23:10 +0200
commitee69aa92802ba9f5becd533465ca1639cb670ace (patch)
treee99102b0e8a29126cd8ff8b12389a5f3b42c083a /ecs/src/lock.rs
parent93f764e1003bb6f35b56b7b91a73ae0ca80282c9 (diff)
feat(ecs): add action to add component(s) to entity
Diffstat (limited to 'ecs/src/lock.rs')
-rw-r--r--ecs/src/lock.rs7
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)]