mirror of
https://github.com/bevyengine/bevy
synced 2024-11-29 08:00:20 +00:00
docs: use read
instead of deprecated iter
(#10376)
https://docs.rs/bevy/latest/bevy/ecs/event/struct.EventReader.html#method.iter # Objective - Remove doc example using deprecated `EventReader.iter` method ## Solution - Update docs to use `read` instead of `iter`
This commit is contained in:
parent
1bd1c25b1a
commit
32a5c7db35
1 changed files with 1 additions and 1 deletions
|
@ -119,7 +119,7 @@ use bevy_utils::Duration;
|
|||
/// struct PauseEvent(bool);
|
||||
///
|
||||
/// fn pause_system(mut time: ResMut<Time<Virtual>>, mut events: EventReader<PauseEvent>) {
|
||||
/// for ev in events.iter() {
|
||||
/// for ev in events.read() {
|
||||
/// if ev.0 {
|
||||
/// time.pause();
|
||||
/// } else {
|
||||
|
|
Loading…
Reference in a new issue