diff options
Diffstat (limited to 'ecs/src/query/options.rs')
-rw-r--r-- | ecs/src/query/options.rs | 16 |
1 files changed, 4 insertions, 12 deletions
diff --git a/ecs/src/query/options.rs b/ecs/src/query/options.rs index bbbe0a8..ead0ac7 100644 --- a/ecs/src/query/options.rs +++ b/ecs/src/query/options.rs @@ -7,16 +7,12 @@ use crate::EntityComponent; /// Query options. pub trait Options { - fn entity_filter<'component>( - components: impl IntoIterator<Item = &'component EntityComponent>, - ) -> bool; + fn entity_filter<'component>(components: &'component [EntityComponent]) -> bool; } impl Options for () { - fn entity_filter<'component>( - _: impl IntoIterator<Item = &'component EntityComponent>, - ) -> bool + fn entity_filter<'component>(_components: &'component [EntityComponent]) -> bool { true } @@ -33,9 +29,7 @@ impl<ComponentT> Options for With<ComponentT> where ComponentT: Component, { - fn entity_filter<'component>( - components: impl IntoIterator<Item = &'component EntityComponent>, - ) -> bool + fn entity_filter<'component>(components: &'component [EntityComponent]) -> bool { let ids_set = components .into_iter() @@ -57,9 +51,7 @@ impl<OptionsT> Options for Not<OptionsT> where OptionsT: Options, { - fn entity_filter<'component>( - components: impl IntoIterator<Item = &'component EntityComponent>, - ) -> bool + fn entity_filter<'component>(components: &'component [EntityComponent]) -> bool { !OptionsT::entity_filter(components) } |