From 93f9f840da11b82c8a13f31f0ba5db8b10e4e9ad Mon Sep 17 00:00:00 2001 From: HampusM Date: Sat, 29 Jun 2024 18:41:04 +0200 Subject: refactor(ecs): pass World ref to system run & param new functions --- ecs/src/sole.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'ecs/src/sole.rs') diff --git a/ecs/src/sole.rs b/ecs/src/sole.rs index 39f65a7..4a4f3af 100644 --- a/ecs/src/sole.rs +++ b/ecs/src/sole.rs @@ -7,7 +7,7 @@ use std::sync::{Arc, Weak}; use crate::lock::{Lock, WriteGuard}; use crate::system::{NoInitParamFlag, Param as SystemParam, System}; use crate::type_name::TypeName; -use crate::WorldData; +use crate::World; /// A type which has a single instance and is shared globally. pub trait Sole: Any + TypeName @@ -104,10 +104,10 @@ where fn new( _system: &'world impl System<'world, SystemImpl>, - world_data: &'world WorldData, + world: &'world World, ) -> Self { - let sole = world_data.sole_storage.get::().unwrap_or_else(|| { + let sole = world.data.sole_storage.get::().unwrap_or_else(|| { panic!("Sole {} was not found in world", type_name::()) }); -- cgit v1.2.3-18-g5258