fix new clippy error (#656)

This commit is contained in:
Carter Anderson 2020-10-10 12:16:52 -07:00 committed by GitHub
parent 333fd3f0e0
commit 1f27d8c727
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -229,7 +229,7 @@ impl<T: bevy_ecs::Resource> Events<T> {
} }
/// Creates a draining iterator that removes all events. /// Creates a draining iterator that removes all events.
pub fn drain<'a>(&'a mut self) -> impl Iterator<Item = T> + 'a { pub fn drain(&mut self) -> impl Iterator<Item = T> + '_ {
let map = |i: EventInstance<T>| i.event; let map = |i: EventInstance<T>| i.event;
match self.state { match self.state {
State::A => self State::A => self