# Hands-on Rust: What does movers.iter\_mut(ecs) do: Chapter 7

**URL:** <https://forum.devtalk.com/t/hands-on-rust-what-does-movers-iter-mut-ecs-do-chapter-7/60975>\
**Category:** PragProg Customers\
**Tags:** question, book-hands-on-rust\
**Created:** [23 June 2022 23:54 UTC](https://forum.devtalk.com/t/hands-on-rust-what-does-movers-iter-mut-ecs-do-chapter-7/60975 "2022-06-23T23:54:42Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![herbert](https://forum.devtalk.com/user_avatar/forum.devtalk.com/herbert/32/1233_2.png) [@herbert](https://forum.devtalk.com/u/herbert)\
**Post date:** [1 July 2022 21:53 UTC](https://forum.devtalk.com/t/hands-on-rust-what-does-movers-iter-mut-ecs-do-chapter-7/60975/2 "2022-07-01T21:53:02Z")

</div>

Sorry for the slow reply, I’ve been at home caring for a baby with daycare plague.

This is a quirk of how Legion works. When we build the `query` structure in-function, Legion has no way of knowing which world we mean. We’ve explicitly requested a `SubWorld` (with access to `Point` and `MovingRandomly`) - so _we_ know that we need that world (the `ecs` variable), but the `query` structure itself doesn’t know that. So we have to tell it, as a parameter to `iter_mut`.

If I were revising it, I’d probably put the query in the system parameters (with automatic wiring up of the subworld). I’ll make a note for a potential future second edition.

Thanks!

---

_[View the full topic](https://forum.devtalk.com/t/hands-on-rust-what-does-movers-iter-mut-ecs-do-chapter-7/60975)._
