From c9a07ff61b607478e264fc0581076643c750fe98 Mon Sep 17 00:00:00 2001 From: HampusM Date: Sat, 16 Nov 2024 17:14:20 +0100 Subject: refactor(ecs): remove system param compatability checking --- ecs/src/system.rs | 14 -------------- 1 file changed, 14 deletions(-) (limited to 'ecs/src/system.rs') 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>() -> bool; - - fn get_comparable() -> Box; } pub struct NoInitParamFlag {} -- cgit v1.2.3-18-g5258