diff options
author | HampusM <hampus@hampusmat.com> | 2024-11-16 17:14:20 +0100 |
---|---|---|
committer | HampusM <hampus@hampusmat.com> | 2024-11-16 17:14:20 +0100 |
commit | c9a07ff61b607478e264fc0581076643c750fe98 (patch) | |
tree | 640e6c6309af6f86df49c492057d281f5f7ea420 /ecs/src/system.rs | |
parent | 136d0511972fd31a82331cf769f8d309cd3438f8 (diff) |
refactor(ecs): remove system param compatability checking
Diffstat (limited to 'ecs/src/system.rs')
-rw-r--r-- | ecs/src/system.rs | 14 |
1 files changed, 0 insertions, 14 deletions
diff --git a/ecs/src/system.rs b/ecs/src/system.rs index afb5aac..046d25b 100644 --- a/ecs/src/system.rs +++ b/ecs/src/system.rs @@ -13,14 +13,11 @@ use crate::component::{ FromOptionalMut as FromOptionalMutComponent, }; use crate::lock::{ReadGuard, WriteGuard}; -use crate::system::util::check_params_are_compatible; use crate::tuple::{ReduceElement as TupleReduceElement, With as TupleWith}; use crate::World; pub mod stateful; -mod util; - pub trait System<'world, Impl>: 'static { type Input; @@ -64,10 +61,6 @@ macro_rules! impl_system { where 'this: 'world { - #( - check_params_are_compatible!(I, TParam~I, $c); - )* - let func = *self; func(#({ @@ -159,9 +152,6 @@ impl Debug for TypeErased type TypeErasedRunFn = dyn Fn(&dyn Any, &World) + RefUnwindSafe + UnwindSafe; /// A parameter to a [`System`]. -/// -/// # Safety -/// The `is_compatible` function is used for safety so it must be implemented properly. pub unsafe trait Param<'world> { type Input; @@ -176,10 +166,6 @@ pub unsafe trait Param<'world> system: &'world impl System<'world, SystemImpl>, world: &'world World, ) -> Self; - - fn is_compatible<Other: Param<'world>>() -> bool; - - fn get_comparable() -> Box<dyn Any>; } pub struct NoInitParamFlag {} |