From f11270dac07c333eb937572f6e842b3b1301bf4d Mon Sep 17 00:00:00 2001 From: Kevin Reid Date: Sun, 29 May 2022 04:51:27 -0700 Subject: [PATCH] Reorganize `EventLoopBuilder::build()` platform documentation Since there's a "Platform-specific" header, it makes sense to put the Linux-specific part under it. On the other hand, "Can only be called on the main thread." is true for all platforms, not just iOS, so there is no reason to call it out for iOS specifically. --- src/event_loop.rs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/event_loop.rs b/src/event_loop.rs index 556f016e..d6a15cfa 100644 --- a/src/event_loop.rs +++ b/src/event_loop.rs @@ -84,14 +84,14 @@ impl EventLoopBuilder { /// in the relevant `platform` module if the target platform supports creating an event loop on /// any thread. /// - /// Usage will result in display backend initialisation, this can be controlled on linux - /// using an environment variable `WINIT_UNIX_BACKEND`. Legal values are `x11` and `wayland`. - /// If it is not set, winit will try to connect to a wayland connection, and if it fails will - /// fallback on x11. If this variable is set with any other value, winit will panic. + /// Calling this function will result in display backend initialisation. /// /// ## Platform-specific /// - /// - **iOS:** Can only be called on the main thread. + /// - **Linux:** Backend type can be controlled using an environment variable + /// `WINIT_UNIX_BACKEND`. Legal values are `x11` and `wayland`. + /// If it is not set, winit will try to connect to a Wayland connection, and if that fails, + /// will fall back on X11. If this variable is set with any other value, winit will panic. #[inline] pub fn build(&mut self) -> EventLoop { EventLoop {