chore: fix nightly clippy

This commit is contained in:
Kirill Chibisov 2025-10-07 17:17:15 +09:00
parent 66283a79bd
commit d815bc089c
6 changed files with 8 additions and 13 deletions

View file

@ -64,7 +64,7 @@
//! [points]: https://en.wikipedia.org/wiki/Point_(typography) //! [points]: https://en.wikipedia.org/wiki/Point_(typography)
//! [picas]: https://en.wikipedia.org/wiki/Pica_(typography) //! [picas]: https://en.wikipedia.org/wiki/Pica_(typography)
#![cfg_attr(docsrs, feature(doc_auto_cfg, doc_cfg_hide), doc(cfg_hide(doc, docsrs)))] #![cfg_attr(docsrs, feature(doc_cfg), doc(auto_cfg(hide(doc, docsrs))))]
#![cfg_attr(feature = "std", forbid(unsafe_code))] #![cfg_attr(feature = "std", forbid(unsafe_code))]
#![no_std] #![no_std]

View file

@ -8,7 +8,7 @@ use std::time::Duration;
#[doc(inline)] #[doc(inline)]
pub use cursor_icon::CursorIcon; pub use cursor_icon::CursorIcon;
use crate::as_any::{impl_dyn_casting, AsAny}; use crate::as_any::AsAny;
/// The maximum width and height for a cursor when using [`CustomCursorSource::from_rgba`]. /// The maximum width and height for a cursor when using [`CustomCursorSource::from_rgba`].
pub const MAX_CURSOR_SIZE: u16 = 2048; pub const MAX_CURSOR_SIZE: u16 = 2048;

View file

@ -3,7 +3,7 @@ use std::ops::Deref;
use std::sync::Arc; use std::sync::Arc;
use std::{fmt, io, mem}; use std::{fmt, io, mem};
use crate::as_any::{impl_dyn_casting, AsAny}; use crate::as_any::AsAny;
pub(crate) const PIXEL_SIZE: usize = mem::size_of::<u32>(); pub(crate) const PIXEL_SIZE: usize = mem::size_of::<u32>();

View file

@ -13,7 +13,7 @@ use std::sync::Arc;
use dpi::{PhysicalPosition, PhysicalSize}; use dpi::{PhysicalPosition, PhysicalSize};
use crate::as_any::{impl_dyn_casting, AsAny}; use crate::as_any::AsAny;
/// Handle to a monitor. /// Handle to a monitor.
/// ///

View file

@ -1601,17 +1601,18 @@ pub enum WindowLevel {
/// The purpose should reflect the kind of data to be entered. /// The purpose should reflect the kind of data to be entered.
/// The purpose may improve UX by optimizing the IME for the specific use case, /// The purpose may improve UX by optimizing the IME for the specific use case,
/// for example showing relevant characters and hiding unneeded ones, /// for example showing relevant characters and hiding unneeded ones,
/// or changing the icon of the confrirmation button, /// or changing the icon of the confirmation button,
/// if winit can express the purpose to the platform and the platform reacts accordingly. /// if winit can express the purpose to the platform and the platform reacts accordingly.
/// ///
/// ## Platform-specific /// ## Platform-specific
/// ///
/// - **iOS / Android / Web / Windows / X11 / macOS / Orbital:** Unsupported. /// - **iOS / Android / Web / Windows / X11 / macOS / Orbital:** Unsupported.
#[non_exhaustive] #[non_exhaustive]
#[derive(Debug, PartialEq, Eq, Clone, Copy, Hash)] #[derive(Debug, PartialEq, Eq, Clone, Copy, Hash, Default)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))] #[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
pub enum ImePurpose { pub enum ImePurpose {
/// No special purpose for the IME (default). /// No special purpose for the IME (default).
#[default]
Normal, Normal,
/// The IME is used for password input. /// The IME is used for password input.
/// The IME will treat the contents as sensitive. /// The IME will treat the contents as sensitive.
@ -1638,12 +1639,6 @@ pub enum ImePurpose {
DateTime, DateTime,
} }
impl Default for ImePurpose {
fn default() -> Self {
Self::Normal
}
}
bitflags! { bitflags! {
/// IME hints /// IME hints
/// ///

View file

@ -278,7 +278,7 @@
#![cfg_attr(clippy, deny(warnings))] #![cfg_attr(clippy, deny(warnings))]
// Doc feature labels can be tested locally by running RUSTDOCFLAGS="--cfg=docsrs" cargo +nightly // Doc feature labels can be tested locally by running RUSTDOCFLAGS="--cfg=docsrs" cargo +nightly
// doc // doc
#![cfg_attr(docsrs, feature(doc_auto_cfg, doc_cfg_hide), doc(cfg_hide(doc, docsrs)))] #![cfg_attr(docsrs, feature(doc_cfg), doc(auto_cfg(hide(doc, docsrs))))]
#![allow(clippy::missing_safety_doc)] #![allow(clippy::missing_safety_doc)]
#![warn(clippy::uninlined_format_args)] #![warn(clippy::uninlined_format_args)]
// TODO: wasm-binding needs to be updated for that to be resolved, for now just silence it. // TODO: wasm-binding needs to be updated for that to be resolved, for now just silence it.