Skip to content

Commit

Permalink
add warning to is_empty
Browse files Browse the repository at this point in the history
  • Loading branch information
IceSentry committed May 7, 2022
1 parent 8a5b576 commit a0dd088
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions crates/bevy_ecs/src/event.rs
Original file line number Diff line number Diff line change
Expand Up @@ -286,6 +286,7 @@ impl<'w, 's, T: Resource> EventReader<'w, 's, T> {

/// Determines if there are any events available to be read without consuming any.
/// If you need to consume the iterator you can use [`EventReader::any`]
/// WARNING: `events.is_empty()` is not the same as doing `!events.any()`
pub fn is_empty(&self) -> bool {
self.len() == 0
}
Expand Down

0 comments on commit a0dd088

Please sign in to comment.