mirror of
https://github.com/rust-windowing/winit.git
synced 2026-08-29 04:40:04 -04:00
chore: appease clippy
This commit is contained in:
@@ -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),
|
||||||
|
|||||||
@@ -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()),
|
||||||
|
|||||||
@@ -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,
|
||||||
|
|||||||
Reference in New Issue
Block a user