Skip to content
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

Missing docs in Query::par_iter and Query::par_iter_mut #11311

Closed
torsteingrindvik opened this issue Jan 12, 2024 · 0 comments · Fixed by #11499
Closed

Missing docs in Query::par_iter and Query::par_iter_mut #11311

torsteingrindvik opened this issue Jan 12, 2024 · 0 comments · Fixed by #11499
Labels
A-ECS Entities, components, systems, and events C-Docs An addition or correction to our documentation D-Trivial Nice and easy! A great choice to get started with Bevy

Comments

@torsteingrindvik
Copy link
Contributor

How can Bevy's documentation be improved?

http://dev-docs.bevyengine.org/bevy/ecs/system/struct.Query.html#method.par_iter

I'd like an example for usage of par_iter and par_iter_mut in the docs.

Several times I have reached for these APIs I keep trying to use it like so:

for transform in transforms_query.par_iter_mut()  {
    ...
});

but you have to use it like:

transforms_query.par_iter_mut().for_each(|mut t| {
    ...
});
@torsteingrindvik torsteingrindvik added C-Docs An addition or correction to our documentation S-Needs-Triage This issue needs to be labelled labels Jan 12, 2024
@alice-i-cecile alice-i-cecile added A-ECS Entities, components, systems, and events D-Trivial Nice and easy! A great choice to get started with Bevy and removed S-Needs-Triage This issue needs to be labelled labels Jan 12, 2024
lkolbly added a commit to lkolbly/bevy that referenced this issue Jan 23, 2024
github-merge-queue bot pushed a commit that referenced this issue Jan 28, 2024
# Objective

Fixes #11311 

## Solution

Adds an example to the documentation for `par_iter_mut`. I didn't add
any examples to `par_iter`, because I couldn't think of a good example
and I figure users can infer that `par_iter` and `par_iter_mut` are
similar.
tjamaan pushed a commit to tjamaan/bevy that referenced this issue Feb 6, 2024
…gine#11499)

# Objective

Fixes bevyengine#11311 

## Solution

Adds an example to the documentation for `par_iter_mut`. I didn't add
any examples to `par_iter`, because I couldn't think of a good example
and I figure users can infer that `par_iter` and `par_iter_mut` are
similar.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-ECS Entities, components, systems, and events C-Docs An addition or correction to our documentation D-Trivial Nice and easy! A great choice to get started with Bevy
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants