summaryrefslogtreecommitdiff
path: root/ecs/examples/optional_component.rs
diff options
context:
space:
mode:
authorHampusM <hampus@hampusmat.com>2025-01-05 22:03:34 +0100
committerHampusM <hampus@hampusmat.com>2025-01-05 22:03:34 +0100
commita44e663eb6d4aaf567dd35f2676014ba5aaa9e00 (patch)
treecd81d1f61b33e1905d6b3def851e5be18838556b /ecs/examples/optional_component.rs
parentcd385ddedc767c953f24109ec3ffe0a07d247ff5 (diff)
feat(ecs): allow control over component mutability in query
Diffstat (limited to 'ecs/examples/optional_component.rs')
-rw-r--r--ecs/examples/optional_component.rs2
1 files changed, 1 insertions, 1 deletions
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<Aggressivity>)>)
+fn pet_cats(query: Query<(&CatName, &mut PettingCapacity, &Option<Aggressivity>)>)
{
for (cat_name, mut petting_capacity, aggressivity) in &query {
let Some(aggressivity) = aggressivity else {