Skip to content

Commit

Permalink
clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
aevyrie committed Feb 22, 2022
1 parent 6af14ce commit 989f128
Showing 1 changed file with 2 additions and 10 deletions.
12 changes: 2 additions & 10 deletions crates/bevy_winit/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -519,20 +519,12 @@ pub fn winit_runner_with(mut app: App) {
.map_or(ControlFlow::Poll, |config| config.control_flow);
*control_flow = config_control_flow;
if let Some(app_redraw_events) = app.world.get_resource::<Events<RequestRedraw>>() {
if redraw_event_reader
.iter(&app_redraw_events)
.last()
.is_some()
{
if redraw_event_reader.iter(app_redraw_events).last().is_some() {
*control_flow = ControlFlow::Poll;
}
}
if let Some(app_exit_events) = app.world.get_resource::<Events<AppExit>>() {
if app_exit_event_reader
.iter(&app_exit_events)
.next_back()
.is_some()
{
if app_exit_event_reader.iter(app_exit_events).last().is_some() {
*control_flow = ControlFlow::Exit;
}
}
Expand Down

0 comments on commit 989f128

Please sign in to comment.