Skip to content

Commit

Permalink
Example for bevy_ecs::event::Events uses deprecated function get_read…
Browse files Browse the repository at this point in the history
…er (#15216)

Fixes #15214
  • Loading branch information
blazepaws authored Sep 15, 2024
1 parent abac8c7 commit 21e3936
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions crates/bevy_ecs/src/event/collections.rs
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ use std::ops::{Deref, DerefMut};
///
/// // setup
/// let mut events = Events::<MyEvent>::default();
/// let mut reader = events.get_reader();
/// let mut cursor = events.get_cursor();
///
/// // run this once per update/frame
/// events.update();
Expand All @@ -54,12 +54,12 @@ use std::ops::{Deref, DerefMut};
/// events.send(MyEvent { value: 1 });
///
/// // somewhere else: read the events
/// for event in reader.read(&events) {
/// for event in cursor.read(&events) {
/// assert_eq!(event.value, 1)
/// }
///
/// // events are only processed once per reader
/// assert_eq!(reader.read(&events).count(), 0);
/// assert_eq!(cursor.read(&events).count(), 0);
/// ```
///
/// # Details
Expand Down

0 comments on commit 21e3936

Please sign in to comment.