summaryrefslogtreecommitdiff
path: root/ecs/src/system.rs
diff options
context:
space:
mode:
authorHampusM <hampus@hampusmat.com>2024-08-16 20:13:22 +0200
committerHampusM <hampus@hampusmat.com>2024-08-16 20:13:22 +0200
commit7d218b2525f90dfedcae02f3b3d0d2f7b9c99bd2 (patch)
treebc9523b82d138a7048ff583dd75e0a8c26fe5e6b /ecs/src/system.rs
parent0f7811f3cba24c8a5927d5bcdfb30dd94de87102 (diff)
feat(ecs): make relationships creatable without reference to world
Diffstat (limited to 'ecs/src/system.rs')
-rw-r--r--ecs/src/system.rs2
1 files changed, 2 insertions, 0 deletions
diff --git a/ecs/src/system.rs b/ecs/src/system.rs
index 36359c7..7c0e454 100644
--- a/ecs/src/system.rs
+++ b/ecs/src/system.rs
@@ -219,6 +219,7 @@ impl<'component, ComponentT: Component> FromOptionalComponent<'component>
{
fn from_optional_component(
inner: Option<WriteGuard<'component, Box<dyn Component>>>,
+ _world: &'component World,
) -> Self
{
Self {
@@ -240,6 +241,7 @@ where
{
fn from_optional_component(
optional_component: Option<WriteGuard<'comp, Box<dyn Component>>>,
+ _world: &'comp World,
) -> Self
{
optional_component.map(|component| ComponentRefMut::new(component))