diff options
Diffstat (limited to 'ecs/src/system')
-rw-r--r-- | ecs/src/system/stateful.rs | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/ecs/src/system/stateful.rs b/ecs/src/system/stateful.rs index e74c0ee..6c0b554 100644 --- a/ecs/src/system/stateful.rs +++ b/ecs/src/system/stateful.rs @@ -7,11 +7,17 @@ use seq_macro::seq; use crate::component::Component; use crate::lock::Lock; use crate::system::util::check_params_are_compatible; -use crate::system::{ComponentRefMut, Into as IntoSystem, Param, System, TypeErased}; +use crate::system::{ + ComponentRefMut, + Into as IntoSystem, + Param, + ParamWithInputFilter, + System, + TypeErased, +}; use crate::tuple::{ IntoInOptions as TupleIntoInOptions, Reduce as TupleReduce, - ReduceNoOp as TupleReduceNoOp, TakeOptionElementResult as TupleTakeOptionElementResult, WithOptionElements as TupleWithOptionElements, }; @@ -33,10 +39,12 @@ macro_rules! impl_system { Func: Fn(#(TParam~I,)*) + Copy + RefUnwindSafe + UnwindSafe + 'static, #(TParam~I: Param<'world>,)* #(TParam~I::Input: 'static,)* - (#(TParam~I::Input,)*): TupleReduce, - <(#(TParam~I::Input,)*) as TupleReduce>::Out: TupleIntoInOptions + (#(TParam~I::Input,)*): TupleReduce<ParamWithInputFilter>, + <(#(TParam~I::Input,)*) as TupleReduce<ParamWithInputFilter>>::Out: + TupleIntoInOptions { - type Input = <(#(TParam~I::Input,)*) as TupleReduce>::Out; + type Input = + <(#(TParam~I::Input,)*) as TupleReduce<ParamWithInputFilter>>::Out; fn initialize(mut self, input: Self::Input) -> Self { @@ -44,7 +52,7 @@ macro_rules! impl_system { #( if TypeId::of::<TParam~I::Input>() != - TypeId::of::<TupleReduceNoOp>() + TypeId::of::<()>() { let input = match option_input.take::<TParam~I::Input>() { TupleTakeOptionElementResult::Found(input) => input, |