diff options
author | HampusM <hampus@hampusmat.com> | 2024-06-29 18:41:04 +0200 |
---|---|---|
committer | HampusM <hampus@hampusmat.com> | 2024-06-29 18:41:04 +0200 |
commit | 93f9f840da11b82c8a13f31f0ba5db8b10e4e9ad (patch) | |
tree | f92798d7c1efcaa1b4e8d44215c7e3459f349498 /ecs/src/sole.rs | |
parent | 4793e4411d98d97f879023dc072f3847201d49da (diff) |
refactor(ecs): pass World ref to system run & param new functions
Diffstat (limited to 'ecs/src/sole.rs')
-rw-r--r-- | ecs/src/sole.rs | 6 |
1 files changed, 3 insertions, 3 deletions
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<SystemImpl>( _system: &'world impl System<'world, SystemImpl>, - world_data: &'world WorldData, + world: &'world World, ) -> Self { - let sole = world_data.sole_storage.get::<SoleT>().unwrap_or_else(|| { + let sole = world.data.sole_storage.get::<SoleT>().unwrap_or_else(|| { panic!("Sole {} was not found in world", type_name::<SoleT>()) }); |