diff --git a/src/platform_impl/windows/event_loop.rs b/src/platform_impl/windows/event_loop.rs index fc8f7edb..5894dc8b 100644 --- a/src/platform_impl/windows/event_loop.rs +++ b/src/platform_impl/windows/event_loop.rs @@ -380,6 +380,7 @@ impl EventLoopRunner { // deferred. if let RunnerState::DeferredNewEvents(wait_start) = self.runner_state { match self.control_flow { + ControlFlow::Exit | ControlFlow::Wait => { self.call_event_handler( Event::NewEvents(StartCause::WaitCancelled { @@ -409,7 +410,6 @@ impl EventLoopRunner { ControlFlow::Poll => { self.call_event_handler(Event::NewEvents(StartCause::Poll)) }, - ControlFlow::Exit => unreachable!() } }