From 37a4e236b8c55c21106c99e764f97b04b62ce363 Mon Sep 17 00:00:00 2001 From: Ferdinand Schober Date: Thu, 12 Jun 2025 17:52:23 +0200 Subject: [PATCH] fix clippy warnings from rust 1.87 (#301) --- input-capture/src/layer_shell.rs | 2 +- input-emulation/src/x11.rs | 2 +- input-emulation/src/xdg_desktop_portal.rs | 1 - 3 files changed, 2 insertions(+), 3 deletions(-) diff --git a/input-capture/src/layer_shell.rs b/input-capture/src/layer_shell.rs index 17cea5f..ab6342a 100644 --- a/input-capture/src/layer_shell.rs +++ b/input-capture/src/layer_shell.rs @@ -813,7 +813,7 @@ impl Dispatch for State { })), )); } - wl_pointer::Event::Frame {} => { + wl_pointer::Event::Frame => { // TODO properly handle frame events // we simply insert a frame event on the client side // after each event for now diff --git a/input-emulation/src/x11.rs b/input-emulation/src/x11.rs index b7e1c73..041d560 100644 --- a/input-emulation/src/x11.rs +++ b/input-emulation/src/x11.rs @@ -23,7 +23,7 @@ impl X11Emulation { pub(crate) fn new() -> Result { let display = unsafe { match xlib::XOpenDisplay(ptr::null()) { - d if d == ptr::null::() as *mut xlib::Display => { + d if std::ptr::eq(d, ptr::null_mut::()) => { Err(X11EmulationCreationError::OpenDisplay) } display => Ok(display), diff --git a/input-emulation/src/xdg_desktop_portal.rs b/input-emulation/src/xdg_desktop_portal.rs index 4bf379b..962a23f 100644 --- a/input-emulation/src/xdg_desktop_portal.rs +++ b/input-emulation/src/xdg_desktop_portal.rs @@ -143,7 +143,6 @@ impl Emulation for DesktopPortalEmulation<'_> { impl AsyncDrop for DesktopPortalEmulation<'_> { #[doc = r" Perform the async cleanup."] - #[must_use] #[allow(clippy::type_complexity, clippy::type_repetition_in_bounds)] fn async_drop<'async_trait>( self,