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

[Merged by Bors] - iter_mut on Assets: send modified event only when asset is iterated over #3565

Closed

Conversation

mockersf
Copy link
Member

@mockersf mockersf commented Jan 5, 2022

Objective

  • Assets<T>::iter_mut sends Modified event for all assets first, then returns the iterator
  • This means that events could be sent for assets that would not have been mutated if iteration was stopped before

Solution

  • Send Modified event when assets are iterated over.

@github-actions github-actions bot added the S-Needs-Triage This issue needs to be labelled label Jan 5, 2022
@mockersf mockersf added A-Assets Load files from disk to use for things like images, models, and sounds C-Code-Quality A section of code that is hard to understand or change and removed S-Needs-Triage This issue needs to be labelled labels Jan 5, 2022
@alice-i-cecile alice-i-cecile added the C-Bug An unexpected or incorrect behavior label Jan 6, 2022
@james7132 james7132 added the S-Ready-For-Final-Review This PR has been approved by the community. It's ready for a maintainer to consider merging it label Mar 3, 2022
@mockersf
Copy link
Member Author

mockersf commented Mar 5, 2022

bors r+

bors bot pushed a commit that referenced this pull request Mar 5, 2022
… over (#3565)

# Objective

- `Assets<T>::iter_mut` sends `Modified` event for all assets first, then returns the iterator
- This means that events could be sent for assets that would not have been mutated if iteration was stopped before

## Solution

- Send `Modified` event when assets are iterated over.


Co-authored-by: François <8672791+mockersf@users.noreply.github.com>
@bors bors bot changed the title iter_mut on Assets: send modified event only when asset is iterated over [Merged by Bors] - iter_mut on Assets: send modified event only when asset is iterated over Mar 5, 2022
@bors bors bot closed this Mar 5, 2022
kurtkuehnert pushed a commit to kurtkuehnert/bevy that referenced this pull request Mar 6, 2022
… over (bevyengine#3565)

# Objective

- `Assets<T>::iter_mut` sends `Modified` event for all assets first, then returns the iterator
- This means that events could be sent for assets that would not have been mutated if iteration was stopped before

## Solution

- Send `Modified` event when assets are iterated over.


Co-authored-by: François <8672791+mockersf@users.noreply.github.com>
aevyrie pushed a commit to aevyrie/bevy that referenced this pull request Jun 7, 2022
… over (bevyengine#3565)

# Objective

- `Assets<T>::iter_mut` sends `Modified` event for all assets first, then returns the iterator
- This means that events could be sent for assets that would not have been mutated if iteration was stopped before

## Solution

- Send `Modified` event when assets are iterated over.


Co-authored-by: François <8672791+mockersf@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Assets Load files from disk to use for things like images, models, and sounds C-Bug An unexpected or incorrect behavior C-Code-Quality A section of code that is hard to understand or change S-Ready-For-Final-Review This PR has been approved by the community. It's ready for a maintainer to consider merging it
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants