From 76660f36217538ba4eaaf41c07abdb9d949d11a4 Mon Sep 17 00:00:00 2001 From: Osspial Date: Mon, 27 May 2019 13:45:26 -0400 Subject: [PATCH] Fix Windows backend invoking unreachable! with Exit and run_return (#887) --- src/platform_impl/windows/event_loop.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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!() } }