diff --git a/src/event_loop.rs b/src/event_loop.rs index 447738547..7c7046c9a 100644 --- a/src/event_loop.rs +++ b/src/event_loop.rs @@ -105,8 +105,9 @@ impl EventLoop { MonitorId { inner: self.events_loop.get_primary_monitor() } } - /// Hijacks the calling thread and initializes the `winit` event loop. Can take a - /// `FnMut(Event, &EventLoop) -> ControlFlow` or a custom `EventHandler` type. + /// Hijacks the calling thread and initializes the `winit` event loop with the provided + /// closure. Since the closure is `'static`, it must be a `move` closure if it needs to + /// access any data from the calling context. /// /// Any values not passed to this function will *not* be dropped. #[inline] diff --git a/src/platform/desktop.rs b/src/platform/desktop.rs index 2aaa9cf21..8e14346ef 100644 --- a/src/platform/desktop.rs +++ b/src/platform/desktop.rs @@ -14,8 +14,8 @@ pub trait EventLoopExtDesktop { /// Initializes the `winit` event loop. /// - /// Unlikes `run`, this function accepts non-`'static` closures and returns control flow to the - /// caller when `control_flow` is set to `ControlFlow::Exit`. + /// Unlikes `run`, this function accepts non-`'static` (i.e. non-`move`) closures and returns + /// control flow to the caller when `control_flow` is set to `ControlFlow::Exit`. fn run_return(&mut self, event_handler: F) where F: FnMut(Event, &EventLoop, &mut ControlFlow); }