-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The iter_many_mut
documentation is confused
#5506
Comments
I'll rebase #4989 to |
To add to this, it would be helpful to add a mention that the returned value is not actually an for foo in q.iter_many_mut(&entities) {} The comment on the /// Iterator type is intentionally implemented only for read-only access.
/// Doing so for mutable references would be unsound,
/// because calling `next` multiple times would allow multiple owned references to the same data to exist.
but it might be good to mention as well on let mut it = q.iter_many_mut(&entities)
while let Some(foo) = it.fetch_next() {} |
# Objective - Increase consistency across documentation of `Query` methods. - Fixes bevyengine#5506 ## Solution - See bevyengine#4989. This PR is derived from it. It just includes changes to the `Query` methods' docs.
# Objective - Increase consistency across documentation of `Query` methods. - Fixes bevyengine#5506 ## Solution - See bevyengine#4989. This PR is derived from it. It just includes changes to the `Query` methods' docs.
The documentation talks about calling a "closure", but
iter_many_mut
doesn't have a closure argument, as the example shows. https://docs.rs/bevy/latest/bevy/ecs/system/struct.Query.html#method.iter_many_mutThe text was updated successfully, but these errors were encountered: