chore: appease clippy

This commit is contained in:
Kirill Chibisov
2025-05-17 14:46:18 +09:00
parent f7ac8127e3
commit 2191eacfc8
3 changed files with 5 additions and 3 deletions

View File

@@ -696,6 +696,7 @@ unsafe extern "C" fn x_error_callback(
0 0
} }
#[allow(clippy::large_enum_variant)]
pub enum EventLoop<T: 'static> { pub enum EventLoop<T: 'static> {
#[cfg(wayland_platform)] #[cfg(wayland_platform)]
Wayland(Box<wayland::EventLoop<T>>), Wayland(Box<wayland::EventLoop<T>>),
@@ -849,6 +850,7 @@ impl<T: 'static> EventLoopProxy<T> {
} }
} }
#[allow(clippy::large_enum_variant)]
pub enum ActiveEventLoop { pub enum ActiveEventLoop {
#[cfg(wayland_platform)] #[cfg(wayland_platform)]
Wayland(wayland::ActiveEventLoop), Wayland(wayland::ActiveEventLoop),

View File

@@ -79,7 +79,7 @@ impl XConnection {
.iter() .iter()
// XRROutputInfo contains an array of mode ids that correspond to // XRROutputInfo contains an array of mode ids that correspond to
// modes in the array in XRRScreenResources // modes in the array in XRRScreenResources
.filter(|x| output_modes.iter().any(|id| x.id == *id)) .filter(|x| output_modes.contains(&x.id))
.map(|mode| { .map(|mode| {
VideoModeHandle { VideoModeHandle {
size: (mode.width.into(), mode.height.into()), size: (mode.width.into(), mode.height.into()),

View File

@@ -976,8 +976,8 @@ impl UnownedWindow {
let vert_atom = atoms[_NET_WM_STATE_MAXIMIZED_VERT]; let vert_atom = atoms[_NET_WM_STATE_MAXIMIZED_VERT];
match state { match state {
Ok(atoms) => { Ok(atoms) => {
let horz_maximized = atoms.iter().any(|atom: &xproto::Atom| *atom == horz_atom); let horz_maximized = atoms.contains(&horz_atom);
let vert_maximized = atoms.iter().any(|atom: &xproto::Atom| *atom == vert_atom); let vert_maximized = atoms.contains(&vert_atom);
horz_maximized && vert_maximized horz_maximized && vert_maximized
}, },
_ => false, _ => false,