From 9979441c82dc645c41c40f6e7f51f791bca9915b Mon Sep 17 00:00:00 2001 From: Mads Marquart Date: Thu, 24 Aug 2023 18:29:31 +0200 Subject: [PATCH] Fix recent CI failures (#3041) * Fix new clippy lints * Fix nightly documentation warnings --- src/event.rs | 5 ++--- src/platform/web.rs | 4 ++-- src/platform_impl/android/keycodes.rs | 4 +--- src/platform_impl/linux/x11/event_processor.rs | 2 +- src/platform_impl/windows/mod.rs | 2 +- 5 files changed, 7 insertions(+), 10 deletions(-) diff --git a/src/event.rs b/src/event.rs index 80d57544e0..de87be7a2a 100644 --- a/src/event.rs +++ b/src/event.rs @@ -62,7 +62,7 @@ pub enum Event { /// /// This event type is useful as a place to put code that should be done before you start /// processing events, such as updating frame timing information for benchmarking or checking - /// the [`StartCause`][crate::event::StartCause] to see if a timer set by + /// the [`StartCause`] to see if a timer set by /// [`ControlFlow::WaitUntil`](crate::event_loop::ControlFlow::WaitUntil) has elapsed. NewEvents(StartCause), @@ -218,8 +218,7 @@ pub enum Event { /// ups and also lots of corresponding `AboutToWait` events. /// /// This is not an ideal event to drive application rendering from and instead applications - /// should render in response to [`Event::RedrawRequested`](crate::event::Event::RedrawRequested) - /// events. + /// should render in response to [`Event::RedrawRequested`] events. AboutToWait, /// Emitted when a window should be redrawn. diff --git a/src/platform/web.rs b/src/platform/web.rs index f1dd64fd54..4b3d9e5287 100644 --- a/src/platform/web.rs +++ b/src/platform/web.rs @@ -48,8 +48,8 @@ impl WindowExtWebSys for Window { } pub trait WindowBuilderExtWebSys { - /// Pass an [`HtmlCanvasElement`] to be used for this [`Window`](crate::window::Window). If - /// [`None`], [`WindowBuilder::build()`] will create one. + /// Pass an [`HtmlCanvasElement`] to be used for this [`Window`]. If [`None`], + /// [`WindowBuilder::build()`] will create one. /// /// In any case, the canvas won't be automatically inserted into the web page. /// diff --git a/src/platform_impl/android/keycodes.rs b/src/platform_impl/android/keycodes.rs index c819070de1..583bd0a06c 100644 --- a/src/platform_impl/android/keycodes.rs +++ b/src/platform_impl/android/keycodes.rs @@ -226,9 +226,7 @@ pub fn to_logical(key_char: Option, keycode: Keycode) -> Key { let native = NativeKey::Android(keycode.into()); match key_char { - Some(KeyMapChar::Unicode(c)) => { - Key::Character(smol_str::SmolStr::from_iter([c].into_iter())) - } + Some(KeyMapChar::Unicode(c)) => Key::Character(smol_str::SmolStr::from_iter([c])), Some(KeyMapChar::CombiningAccent(c)) => Key::Dead(Some(c)), None | Some(KeyMapChar::None) => match keycode { // Using `BrowserHome` instead of `GoHome` according to diff --git a/src/platform_impl/linux/x11/event_processor.rs b/src/platform_impl/linux/x11/event_processor.rs index 5d030f89d2..c67827a70b 100644 --- a/src/platform_impl/linux/x11/event_processor.rs +++ b/src/platform_impl/linux/x11/event_processor.rs @@ -732,7 +732,7 @@ impl EventProcessor { // Suppress emulated scroll wheel clicks, since we handle the real motion events for those. // In practice, even clicky scroll wheels appear to be reported by evdev (and XInput2 in // turn) as axis motion, so we don't otherwise special-case these button presses. - 4 | 5 | 6 | 7 => { + 4..=7 => { if xev.flags & ffi::XIPointerEmulated == 0 { callback(Event::WindowEvent { window_id, diff --git a/src/platform_impl/windows/mod.rs b/src/platform_impl/windows/mod.rs index 3d5c02a7b1..045baa7654 100644 --- a/src/platform_impl/windows/mod.rs +++ b/src/platform_impl/windows/mod.rs @@ -16,7 +16,7 @@ pub(crate) use self::{ }; pub use self::icon::WinIcon as PlatformIcon; -pub(self) use crate::platform_impl::Fullscreen; +use crate::platform_impl::Fullscreen; use crate::event::DeviceId as RootDeviceId; use crate::icon::Icon;