mirror of
https://github.com/bevyengine/bevy
synced 2024-11-26 22:50:19 +00:00
b337ed63ad
The PR fixes the interface of `EventReader::clear`. Currently, the method consumes the reader, which makes it unusable. ## Changelog - `EventReader::clear` now takes a mutable reference instead of consuming the event reader. ## Migration Guide `EventReader::clear` now takes a mutable reference instead of consuming the event reader. This means that `clear` now needs explicit mutable access to the reader variable, which previously could have been omitted in some cases: ```rust // Old (0.9) fn clear_events(reader: EventReader<SomeEvent>) { reader.clear(); } // New (0.10) fn clear_events(mut reader: EventReader<SomeEvent>) { reader.clear(); } ``` Co-authored-by: Carter Anderson <mcanders1@gmail.com> |
||
---|---|---|
.. | ||
alien_cake_addict.rs | ||
breakout.rs | ||
contributors.rs | ||
game_menu.rs |