diff options
Diffstat (limited to 'ecs/examples/simple.rs')
-rw-r--r-- | ecs/examples/simple.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/ecs/examples/simple.rs b/ecs/examples/simple.rs index b8dc50f..76d9538 100644 --- a/ecs/examples/simple.rs +++ b/ecs/examples/simple.rs @@ -12,9 +12,9 @@ struct Greeting greeting: String, } -fn say_hello(mut query: Query<(SomeData, Greeting)>) +fn say_hello(query: Query<(SomeData, Greeting)>) { - for (data, greeting) in query.iter_mut() { + for (data, greeting) in &query { println!("{}: {}", greeting.greeting, data.num); } } |