mirror of
https://github.com/rust-windowing/winit.git
synced 2026-06-27 07:03:15 -04:00
chore: appease clippy
This commit is contained in:
@@ -696,6 +696,7 @@ unsafe extern "C" fn x_error_callback(
|
||||
0
|
||||
}
|
||||
|
||||
#[allow(clippy::large_enum_variant)]
|
||||
pub enum EventLoop<T: 'static> {
|
||||
#[cfg(wayland_platform)]
|
||||
Wayland(Box<wayland::EventLoop<T>>),
|
||||
@@ -849,6 +850,7 @@ impl<T: 'static> EventLoopProxy<T> {
|
||||
}
|
||||
}
|
||||
|
||||
#[allow(clippy::large_enum_variant)]
|
||||
pub enum ActiveEventLoop {
|
||||
#[cfg(wayland_platform)]
|
||||
Wayland(wayland::ActiveEventLoop),
|
||||
|
||||
@@ -79,7 +79,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 {
|
||||
size: (mode.width.into(), mode.height.into()),
|
||||
|
||||
@@ -976,8 +976,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,
|
||||
|
||||
Reference in New Issue
Block a user