diff options
author | HampusM <hampus@hampusmat.com> | 2025-04-08 17:19:30 +0200 |
---|---|---|
committer | HampusM <hampus@hampusmat.com> | 2025-04-08 17:19:30 +0200 |
commit | 7276f9c72f53f02820c3238f72d099221daf7afd (patch) | |
tree | d523d0c01a9cd35bcc44401b46d9c8d36bbb10c1 /ecs/tests/query.rs | |
parent | e4818dd4f0a57a2c9af8859253f570607f64bb12 (diff) |
refactor(ecs): replace optional components with Option query term
Diffstat (limited to 'ecs/tests/query.rs')
-rw-r--r-- | ecs/tests/query.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/ecs/tests/query.rs b/ecs/tests/query.rs index 0f02bd3..6e747e3 100644 --- a/ecs/tests/query.rs +++ b/ecs/tests/query.rs @@ -210,7 +210,7 @@ fn query_archetype_exists_with_4_comps_diff_to_next_archetype_and_opt_comp() let ent_2_id = world.create_entity((A, B, G)); assert_query_finds_ents( - world.query::<(&A, &Option<E>, &G), ()>(), + world.query::<(&A, Option<&E>, &G), ()>(), vec![ent_1_id, ent_2_id], ); } @@ -249,7 +249,7 @@ fn query_archetype_nonexistant_and_opt_comp() world.create_entity((A, B, C, G, F)); assert_query_finds_ents( - world.query::<(&A, &E, &Option<D>), ()>(), + world.query::<(&A, &E, Option<&D>), ()>(), vec![ent_2_id, ent_3_id], ); } |