Fix recent CI failures (#3041)

* Fix new clippy lints

* Fix nightly documentation warnings
This commit is contained in:
Mads Marquart 2023-08-24 18:29:31 +02:00 committed by GitHub
parent 309e6aa85a
commit 9979441c82
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 7 additions and 10 deletions

View file

@ -62,7 +62,7 @@ pub enum Event<T: 'static> {
/// ///
/// This event type is useful as a place to put code that should be done before you start /// 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 /// 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. /// [`ControlFlow::WaitUntil`](crate::event_loop::ControlFlow::WaitUntil) has elapsed.
NewEvents(StartCause), NewEvents(StartCause),
@ -218,8 +218,7 @@ pub enum Event<T: 'static> {
/// ups and also lots of corresponding `AboutToWait` events. /// ups and also lots of corresponding `AboutToWait` events.
/// ///
/// This is not an ideal event to drive application rendering from and instead applications /// 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) /// should render in response to [`Event::RedrawRequested`] events.
/// events.
AboutToWait, AboutToWait,
/// Emitted when a window should be redrawn. /// Emitted when a window should be redrawn.

View file

@ -48,8 +48,8 @@ impl WindowExtWebSys for Window {
} }
pub trait WindowBuilderExtWebSys { pub trait WindowBuilderExtWebSys {
/// Pass an [`HtmlCanvasElement`] to be used for this [`Window`](crate::window::Window). If /// Pass an [`HtmlCanvasElement`] to be used for this [`Window`]. If [`None`],
/// [`None`], [`WindowBuilder::build()`] will create one. /// [`WindowBuilder::build()`] will create one.
/// ///
/// In any case, the canvas won't be automatically inserted into the web page. /// In any case, the canvas won't be automatically inserted into the web page.
/// ///

View file

@ -226,9 +226,7 @@ pub fn to_logical(key_char: Option<KeyMapChar>, keycode: Keycode) -> Key {
let native = NativeKey::Android(keycode.into()); let native = NativeKey::Android(keycode.into());
match key_char { match key_char {
Some(KeyMapChar::Unicode(c)) => { Some(KeyMapChar::Unicode(c)) => Key::Character(smol_str::SmolStr::from_iter([c])),
Key::Character(smol_str::SmolStr::from_iter([c].into_iter()))
}
Some(KeyMapChar::CombiningAccent(c)) => Key::Dead(Some(c)), Some(KeyMapChar::CombiningAccent(c)) => Key::Dead(Some(c)),
None | Some(KeyMapChar::None) => match keycode { None | Some(KeyMapChar::None) => match keycode {
// Using `BrowserHome` instead of `GoHome` according to // Using `BrowserHome` instead of `GoHome` according to

View file

@ -732,7 +732,7 @@ impl<T: 'static> EventProcessor<T> {
// Suppress emulated scroll wheel clicks, since we handle the real motion events for those. // 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 // 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. // 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 { if xev.flags & ffi::XIPointerEmulated == 0 {
callback(Event::WindowEvent { callback(Event::WindowEvent {
window_id, window_id,

View file

@ -16,7 +16,7 @@ pub(crate) use self::{
}; };
pub use self::icon::WinIcon as PlatformIcon; 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::event::DeviceId as RootDeviceId;
use crate::icon::Icon; use crate::icon::Icon;