From 7276f9c72f53f02820c3238f72d099221daf7afd Mon Sep 17 00:00:00 2001 From: HampusM Date: Tue, 8 Apr 2025 17:19:30 +0200 Subject: refactor(ecs): replace optional components with Option query term --- ecs/tests/query.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'ecs/tests/query.rs') 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, &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), ()>(), + world.query::<(&A, &E, Option<&D>), ()>(), vec![ent_2_id, ent_3_id], ); } -- cgit v1.2.3-18-g5258