diff --git a/crates/bootstrap/src/lib.rs b/crates/bootstrap/src/lib.rs index 3e2fc618..e4ff6e8c 100644 --- a/crates/bootstrap/src/lib.rs +++ b/crates/bootstrap/src/lib.rs @@ -99,11 +99,7 @@ impl ApplicationHandler for App { fn new_events(&mut self, _event_loop: &ActiveEventLoop, cause: winit::event::StartCause) { if let Some(app) = self.app.as_mut() { - if cause == StartCause::Init { - app.is_init = true; - } else { - app.is_init = false; - } + app.is_init = cause == StartCause::Init; } } diff --git a/crates/demo/src/main.rs b/crates/demo/src/main.rs index b1e3125c..267b0d01 100644 --- a/crates/demo/src/main.rs +++ b/crates/demo/src/main.rs @@ -31,11 +31,7 @@ async fn run(event_loop: EventLoop<()>, window: Window) { } Event::NewEvents(cause) => { - if cause == StartCause::Init { - graphics.is_init = true; - } else { - graphics.is_init = false; - } + graphics.is_init = cause == StartCause::Init; } Event::WindowEvent {