diff options
Diffstat (limited to 'ecs/src/query/options.rs')
-rw-r--r-- | ecs/src/query/options.rs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/ecs/src/query/options.rs b/ecs/src/query/options.rs index 772d091..6318359 100644 --- a/ecs/src/query/options.rs +++ b/ecs/src/query/options.rs @@ -8,12 +8,12 @@ use crate::EntityComponent; /// Query options. pub trait Options { - fn entity_filter<'component>(components: &'component [EntityComponent]) -> bool; + fn entity_filter(components: &[EntityComponent]) -> bool; } impl Options for () { - fn entity_filter<'component>(_components: &'component [EntityComponent]) -> bool + fn entity_filter(_components: &[EntityComponent]) -> bool { true } @@ -30,10 +30,10 @@ impl<ComponentT> Options for With<ComponentT> where ComponentT: Component, { - fn entity_filter<'component>(components: &'component [EntityComponent]) -> bool + fn entity_filter(components: &[EntityComponent]) -> bool { let ids_set = components - .into_iter() + .iter() .map(|component| component.id) .collect::<HashSet<_>>(); @@ -52,7 +52,7 @@ impl<OptionsT> Options for Not<OptionsT> where OptionsT: Options, { - fn entity_filter<'component>(components: &'component [EntityComponent]) -> bool + fn entity_filter(components: &[EntityComponent]) -> bool { !OptionsT::entity_filter(components) } |