diff options
Diffstat (limited to 'ecs/src/lib.rs')
-rw-r--r-- | ecs/src/lib.rs | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/ecs/src/lib.rs b/ecs/src/lib.rs index 3caaa6b..32d82bc 100644 --- a/ecs/src/lib.rs +++ b/ecs/src/lib.rs @@ -184,10 +184,10 @@ impl World Query::new(self) } - pub fn flexible_query<'terms>( + pub fn flexible_query<const MAX_TERM_CNT: usize>( &self, - terms: QueryTerms<'terms>, - ) -> FlexibleQuery<'_, 'terms> + terms: QueryTerms<MAX_TERM_CNT>, + ) -> FlexibleQuery<'_, MAX_TERM_CNT> { FlexibleQuery::new(self, terms) } @@ -536,11 +536,9 @@ impl World fn emit_event_by_id(&self, event_id: Uid) { - let mut query_required_ids = [SystemComponent::id(), event_id]; - let query = self.flexible_query( - QueryTerms::builder() - .with_required_ids(&mut query_required_ids) + QueryTerms::<2>::builder() + .with_required([SystemComponent::id(), event_id]) .build(), ); |