diff options
| author | HampusM <hampus@hampusmat.com> | 2025-03-18 16:59:53 +0100 | 
|---|---|---|
| committer | HampusM <hampus@hampusmat.com> | 2025-03-19 20:24:12 +0100 | 
| commit | 76e7e612e7b516bf52b508ae5bb367b1ddc3babc (patch) | |
| tree | 1975b4db0eecb74583ab78e58afa50b5326347b2 /ecs/tests/query.rs | |
| parent | 44cd47fd67102902b649c98b85c5abb9a0da39f8 (diff) | |
refactor(ecs): replace component::RefSequence with query terms
Diffstat (limited to 'ecs/tests/query.rs')
| -rw-r--r-- | ecs/tests/query.rs | 9 | 
1 files changed, 5 insertions, 4 deletions
diff --git a/ecs/tests/query.rs b/ecs/tests/query.rs index 010ffc9..79dfe85 100644 --- a/ecs/tests/query.rs +++ b/ecs/tests/query.rs @@ -1,4 +1,5 @@ -use ecs::component::{Component, RefSequence as ComponentRefSequence}; +use ecs::component::Component; +use ecs::query::TermSequence as QueryTermSequence;  use ecs::uid::Uid;  use ecs::{Component, World};  use parking_lot::{Mutex, Once}; @@ -41,13 +42,13 @@ fn setup()      });  } -fn assert_query_finds_ents<Comps>(world: &World, mut expected_ent_ids: Vec<Uid>) +fn assert_query_finds_ents<QueryTerms>(world: &World, mut expected_ent_ids: Vec<Uid>)  where -    Comps: ComponentRefSequence, +    QueryTerms: QueryTermSequence,  {      assert!(          world -            .query::<Comps, ()>() +            .query::<QueryTerms, ()>()              .iter_with_euids()              .all(|(ent_id, _)| {                  let Some(index) = expected_ent_ids  | 
