Skip to content

Commit 989f128

Browse files
committed
clippy
1 parent 6af14ce commit 989f128

File tree

1 file changed

+2
-10
lines changed

1 file changed

+2
-10
lines changed

crates/bevy_winit/src/lib.rs

+2-10
Original file line numberDiff line numberDiff line change
@@ -519,20 +519,12 @@ pub fn winit_runner_with(mut app: App) {
519519
.map_or(ControlFlow::Poll, |config| config.control_flow);
520520
*control_flow = config_control_flow;
521521
if let Some(app_redraw_events) = app.world.get_resource::<Events<RequestRedraw>>() {
522-
if redraw_event_reader
523-
.iter(&app_redraw_events)
524-
.last()
525-
.is_some()
526-
{
522+
if redraw_event_reader.iter(app_redraw_events).last().is_some() {
527523
*control_flow = ControlFlow::Poll;
528524
}
529525
}
530526
if let Some(app_exit_events) = app.world.get_resource::<Events<AppExit>>() {
531-
if app_exit_event_reader
532-
.iter(&app_exit_events)
533-
.next_back()
534-
.is_some()
535-
{
527+
if app_exit_event_reader.iter(app_exit_events).last().is_some() {
536528
*control_flow = ControlFlow::Exit;
537529
}
538530
}

0 commit comments

Comments
 (0)