From a44e663eb6d4aaf567dd35f2676014ba5aaa9e00 Mon Sep 17 00:00:00 2001 From: HampusM Date: Sun, 5 Jan 2025 22:03:34 +0100 Subject: feat(ecs): allow control over component mutability in query --- ecs/examples/optional_component.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'ecs/examples/optional_component.rs') diff --git a/ecs/examples/optional_component.rs b/ecs/examples/optional_component.rs index bcc0c54..488dad2 100644 --- a/ecs/examples/optional_component.rs +++ b/ecs/examples/optional_component.rs @@ -21,7 +21,7 @@ pub struct CatName name: String, } -fn pet_cats(query: Query<(CatName, PettingCapacity, Option)>) +fn pet_cats(query: Query<(&CatName, &mut PettingCapacity, &Option)>) { for (cat_name, mut petting_capacity, aggressivity) in &query { let Some(aggressivity) = aggressivity else { -- cgit v1.2.3-18-g5258