diff --git a/src/event.rs b/src/event.rs index 3d14f70417..38eec58a1c 100644 --- a/src/event.rs +++ b/src/event.rs @@ -539,11 +539,11 @@ pub struct KeyEvent { /// ## Caveats /// /// - Certain niche hardware will shuffle around physical key positions, e.g. a keyboard that - /// implements DVORAK in hardware (or firmware) + /// implements DVORAK in hardware (or firmware) /// - Your application will likely have to handle keyboards which are missing keys that your - /// own keyboard has. + /// own keyboard has. /// - Certain `KeyCode`s will move between a couple of different positions depending on what - /// layout the keyboard was manufactured to support. + /// layout the keyboard was manufactured to support. /// /// **Because of these caveats, it is important that you provide users with a way to configure /// most (if not all) keybinds in your application.** @@ -565,8 +565,7 @@ pub struct KeyEvent { /// /// This has two use cases: /// - Allows querying whether the current input is a Dead key. - /// - Allows handling key-bindings on platforms which don't - /// support [`key_without_modifiers`]. + /// - Allows handling key-bindings on platforms which don't support [`key_without_modifiers`]. /// /// If you use this field (or [`key_without_modifiers`] for that matter) for keyboard /// shortcuts, **it is important that you provide users with a way to configure your @@ -574,8 +573,8 @@ pub struct KeyEvent { /// incompatible keyboard layout.** /// /// ## Platform-specific - /// - **Web:** Dead keys might be reported as the real key instead - /// of `Dead` depending on the browser/OS. + /// - **Web:** Dead keys might be reported as the real key instead of `Dead` depending on the + /// browser/OS. /// /// [`key_without_modifiers`]: crate::platform::modifier_supplement::KeyEventExtModifierSupplement::key_without_modifiers pub logical_key: keyboard::Key, @@ -857,8 +856,8 @@ pub struct Touch { /// /// - Only available on **iOS** 9.0+, **Windows** 8+, **Web**, and **Android**. /// - **Android**: This will never be [None]. If the device doesn't support pressure - /// sensitivity, force will either be 0.0 or 1.0. Also see the - /// [android documentation](https://developer.android.com/reference/android/view/MotionEvent#AXIS_PRESSURE). + /// sensitivity, force will either be 0.0 or 1.0. Also see the + /// [android documentation](https://developer.android.com/reference/android/view/MotionEvent#AXIS_PRESSURE). pub force: Option, /// Unique identifier of a finger. pub id: u64, diff --git a/src/platform/pump_events.rs b/src/platform/pump_events.rs index 802e86eeea..c44bc334b0 100644 --- a/src/platform/pump_events.rs +++ b/src/platform/pump_events.rs @@ -48,18 +48,18 @@ pub trait EventLoopExtPumpEvents { /// - `RedrawRequested` events, used to schedule rendering. /// /// macOS for example uses a `drawRect` callback to drive rendering - /// within applications and expects rendering to be finished before - /// the `drawRect` callback returns. + /// within applications and expects rendering to be finished before + /// the `drawRect` callback returns. /// /// For portability it's strongly recommended that applications should - /// keep their rendering inside the closure provided to Winit. + /// keep their rendering inside the closure provided to Winit. /// - Any lifecycle events, such as `Suspended` / `Resumed`. /// /// The handling of these events needs to be synchronized with the - /// operating system and it would never be appropriate to buffer a - /// notification that your application has been suspended or resumed and - /// then handled that later since there would always be a chance that - /// other lifecycle events occur while the event is buffered. + /// operating system and it would never be appropriate to buffer a + /// notification that your application has been suspended or resumed and + /// then handled that later since there would always be a chance that + /// other lifecycle events occur while the event is buffered. /// /// ## Supported Platforms /// @@ -70,13 +70,13 @@ pub trait EventLoopExtPumpEvents { /// /// ## Unsupported Platforms /// - /// - **Web:** This API is fundamentally incompatible with the event-based way in which - /// Web browsers work because it's not possible to have a long-running external - /// loop that would block the browser and there is nothing that can be - /// polled to ask for new new events. Events are delivered via callbacks based - /// on an event loop that is internal to the browser itself. + /// - **Web:** This API is fundamentally incompatible with the event-based way in which Web + /// browsers work because it's not possible to have a long-running external loop that would + /// block the browser and there is nothing that can be polled to ask for new new events. + /// Events are delivered via callbacks based on an event loop that is internal to the browser + /// itself. /// - **iOS:** It's not possible to stop and start an `NSApplication` repeatedly on iOS so - /// there's no way to support the same approach to polling as on MacOS. + /// there's no way to support the same approach to polling as on MacOS. /// /// ## Platform-specific /// diff --git a/src/window.rs b/src/window.rs index 5c1516c65b..416e5f64c9 100644 --- a/src/window.rs +++ b/src/window.rs @@ -416,8 +416,8 @@ impl WindowAttributes { /// /// ## Platform-specific /// - /// - **macOS**: if `false`, [`NSWindowSharingNone`] is used but doesn't completely - /// prevent all apps from reading the window content, for instance, QuickTime. + /// - **macOS**: if `false`, [`NSWindowSharingNone`] is used but doesn't completely prevent all + /// apps from reading the window content, for instance, QuickTime. /// - **iOS / Android / Web / x11 / Orbital:** Ignored. /// /// [`NSWindowSharingNone`]: https://developer.apple.com/documentation/appkit/nswindowsharingtype/nswindowsharingnone @@ -465,8 +465,8 @@ impl WindowAttributes { /// ## Platform-specific /// /// - **Windows** : A child window has the WS_CHILD style and is confined - /// to the client area of its parent window. For more information, see - /// + /// to the client area of its parent window. For more information, see + /// /// - **X11**: A child window is confined to the client area of its parent window. /// - **Android / iOS / Wayland / Web:** Unsupported. #[cfg(feature = "rwh_06")] @@ -529,9 +529,9 @@ impl Window { /// provided by XRandR. /// /// If `WINIT_X11_SCALE_FACTOR` is set to `randr`, it'll ignore the `Xft.dpi` field and use - /// the XRandR scaling method. Generally speaking, you should try to configure the - /// standard system variables to do what you want before resorting to - /// `WINIT_X11_SCALE_FACTOR`. + /// the XRandR scaling method. Generally speaking, you should try to configure the + /// standard system variables to do what you want before resorting to + /// `WINIT_X11_SCALE_FACTOR`. /// - **Wayland:** The scale factor is suggested by the compositor for each window individually /// by using the wp-fractional-scale protocol if available. Falls back to integer-scale /// factors otherwise. @@ -1394,8 +1394,8 @@ impl Window { /// /// ## Platform-specific /// - /// - **macOS**: if `false`, [`NSWindowSharingNone`] is used but doesn't completely - /// prevent all apps from reading the window content, for instance, QuickTime. + /// - **macOS**: if `false`, [`NSWindowSharingNone`] is used but doesn't completely prevent all + /// apps from reading the window content, for instance, QuickTime. /// - **iOS / Android / x11 / Wayland / Web / Orbital:** Unsupported. /// /// [`NSWindowSharingNone`]: https://developer.apple.com/documentation/appkit/nswindowsharingtype/nswindowsharingnone