From 0d5265fee6c90ccda00a3e6eb1398b764169f4c3 Mon Sep 17 00:00:00 2001 From: Jesus Bracho Date: Sat, 4 Nov 2023 21:45:04 -0400 Subject: [PATCH] docs: use `read` instead of deprecated `iter` https://docs.rs/bevy/latest/bevy/ecs/event/struct.EventReader.html#method.iter --- crates/bevy_time/src/time.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/bevy_time/src/time.rs b/crates/bevy_time/src/time.rs index d78265f7768de..7d4a30dfe22d6 100644 --- a/crates/bevy_time/src/time.rs +++ b/crates/bevy_time/src/time.rs @@ -119,7 +119,7 @@ use bevy_utils::Duration; /// struct PauseEvent(bool); /// /// fn pause_system(mut time: ResMut>, mut events: EventReader) { -/// for ev in events.iter() { +/// for ev in events.read() { /// if ev.0 { /// time.pause(); /// } else {