Refactor EventReader::iter to read#9631
Merged
alice-i-cecile merged 4 commits intobevyengine:mainfrom Aug 30, 2023
Merged
Conversation
alice-i-cecile
approved these changes
Aug 29, 2023
Member
|
Can you rename the methods for |
joseph-gio
approved these changes
Aug 29, 2023
nicopap
approved these changes
Aug 30, 2023
This was referenced Aug 30, 2023
rdrpenguin04
pushed a commit
to rdrpenguin04/bevy
that referenced
this pull request
Jan 9, 2024
# Objective - The current `EventReader::iter` has been determined to cause confusion among new Bevy users. It was suggested by @JoJoJet to rename the method to better clarify its usage. - Solves bevyengine#9624 ## Solution - Rename `EventReader::iter` to `EventReader::read`. - Rename `EventReader::iter_with_id` to `EventReader::read_with_id`. - Rename `ManualEventReader::iter` to `ManualEventReader::read`. - Rename `ManualEventReader::iter_with_id` to `ManualEventReader::read_with_id`. --- ## Changelog - `EventReader::iter` has been renamed to `EventReader::read`. - `EventReader::iter_with_id` has been renamed to `EventReader::read_with_id`. - `ManualEventReader::iter` has been renamed to `ManualEventReader::read`. - `ManualEventReader::iter_with_id` has been renamed to `ManualEventReader::read_with_id`. - Deprecated `EventReader::iter` - Deprecated `EventReader::iter_with_id` - Deprecated `ManualEventReader::iter` - Deprecated `ManualEventReader::iter_with_id` ## Migration Guide - Existing usages of `EventReader::iter` and `EventReader::iter_with_id` will have to be changed to `EventReader::read` and `EventReader::read_with_id` respectively. - Existing usages of `ManualEventReader::iter` and `ManualEventReader::iter_with_id` will have to be changed to `ManualEventReader::read` and `ManualEventReader::read_with_id` respectively.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Objective
EventReader::iterhas been determined to cause confusion among new Bevy users. It was suggested by @JoJoJet to rename the method to better clarify its usage.EventReader::iter#9624Solution
EventReader::itertoEventReader::read.EventReader::iter_with_idtoEventReader::read_with_id.ManualEventReader::itertoManualEventReader::read.ManualEventReader::iter_with_idtoManualEventReader::read_with_id.Changelog
EventReader::iterhas been renamed toEventReader::read.EventReader::iter_with_idhas been renamed toEventReader::read_with_id.ManualEventReader::iterhas been renamed toManualEventReader::read.ManualEventReader::iter_with_idhas been renamed toManualEventReader::read_with_id.EventReader::iterEventReader::iter_with_idManualEventReader::iterManualEventReader::iter_with_idMigration Guide
EventReader::iterandEventReader::iter_with_idwill have to be changed toEventReader::readandEventReader::read_with_idrespectively.ManualEventReader::iterandManualEventReader::iter_with_idwill have to be changed toManualEventReader::readandManualEventReader::read_with_idrespectively.