From 7d218b2525f90dfedcae02f3b3d0d2f7b9c99bd2 Mon Sep 17 00:00:00 2001 From: HampusM Date: Fri, 16 Aug 2024 20:13:22 +0200 Subject: feat(ecs): make relationships creatable without reference to world --- ecs/src/system.rs | 2 ++ 1 file changed, 2 insertions(+) (limited to 'ecs/src/system.rs') 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>>, + _world: &'component World, ) -> Self { Self { @@ -240,6 +241,7 @@ where { fn from_optional_component( optional_component: Option>>, + _world: &'comp World, ) -> Self { optional_component.map(|component| ComponentRefMut::new(component)) -- cgit v1.2.3-18-g5258