chose: appease clippy

This commit is contained in:
Mads Marquart 2025-05-17 03:56:51 +02:00 committed by GitHub
parent ed4ebd4242
commit 03c01e038b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 20 additions and 18 deletions

View file

@ -119,6 +119,7 @@ macro_rules! x11_or_wayland {
}
#[derive(Debug)]
#[allow(clippy::large_enum_variant)]
pub enum EventLoop {
#[cfg(wayland_platform)]
Wayland(Box<wayland::EventLoop>),

View file

@ -82,7 +82,7 @@ impl XConnection {
.iter()
// XRROutputInfo contains an array of mode ids that correspond to
// 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| VideoModeHandle {
current: mode.id == current_mode,
mode: VideoMode::new(

View file

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