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/with_local.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'ecs/examples/with_local.rs') diff --git a/ecs/examples/with_local.rs b/ecs/examples/with_local.rs index 0872dfc..4658fc0 100644 --- a/ecs/examples/with_local.rs +++ b/ecs/examples/with_local.rs @@ -21,7 +21,7 @@ struct SayHelloState cnt: usize, } -fn say_hello(query: Query<(SomeData,)>, mut state: Local) +fn say_hello(query: Query<(&SomeData,)>, mut state: Local) { for (data,) in &query { println!("Hello there. Count {}: {}", state.cnt, data.num); @@ -30,7 +30,7 @@ fn say_hello(query: Query<(SomeData,)>, mut state: Local) } } -fn say_whats_up(query: Query<(SomeData, Name)>, mut state: Local) +fn say_whats_up(query: Query<(&SomeData, &Name)>, mut state: Local) { for (data, name) in &query { println!( -- cgit v1.2.3-18-g5258