Skip to content

Commit

Permalink
docs: use read instead of deprecated iter (bevyengine#10376)
Browse files Browse the repository at this point in the history
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`
  • Loading branch information
HeyZoos authored Nov 5, 2023
1 parent 1bd1c25 commit 32a5c7d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion crates/bevy_time/src/time.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 32a5c7d

Please sign in to comment.