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

Add DiagnosticsStore::iter_mut #9679

Merged

Conversation

SludgePhD
Copy link
Contributor

Objective

Allow mutably iterating over all registered diagnostics. This is a useful utility method when exposing bevy's diagnostics in an editor that allows toggling whether the diagnostic is enabled.

Solution

  • Add iter_mut, mirroring what iter does, just mutably.

Changelog

Added

  • Added DiagnosticsStore::iter_mut for mutably iterating over all registered diagnostics.

@alice-i-cecile alice-i-cecile added C-Usability A targeted quality-of-life change that makes Bevy easier to use A-Diagnostics Logging, crash handling, error reporting and performance analysis labels Sep 3, 2023
@alice-i-cecile alice-i-cecile added S-Ready-For-Final-Review This PR has been approved by the community. It's ready for a maintainer to consider merging it A-Editor Graphical tools to make Bevy games labels Sep 3, 2023
@alice-i-cecile alice-i-cecile added this pull request to the merge queue Sep 3, 2023
Merged via the queue into bevyengine:main with commit ae8a4a8 Sep 3, 2023
26 checks passed
@SludgePhD SludgePhD deleted the diagnosticsstore-iter-mut branch September 3, 2023 17:11
rdrpenguin04 pushed a commit to rdrpenguin04/bevy that referenced this pull request Jan 9, 2024
# Objective

Allow mutably iterating over all registered diagnostics. This is a
useful utility method when exposing bevy's diagnostics in an editor that
allows toggling whether the diagnostic is enabled.

## Solution

- Add `iter_mut`, mirroring what `iter` does, just mutably.

---

## Changelog

### Added

- Added `DiagnosticsStore::iter_mut` for mutably iterating over all
registered diagnostics.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Diagnostics Logging, crash handling, error reporting and performance analysis A-Editor Graphical tools to make Bevy games C-Usability A targeted quality-of-life change that makes Bevy easier to use 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