From 5b0e7bca9332234c8d43627005e9aa76eec06250 Mon Sep 17 00:00:00 2001 From: V Date: Mon, 8 Apr 2024 06:02:18 +0200 Subject: [PATCH] Remove/rename unused stuff --- window/src/os/wayland/cursor_shape.rs | 24 ++++++++++++------------ window/src/os/wayland/data_device.rs | 4 ++-- window/src/os/wayland/window.rs | 11 +++++------ 3 files changed, 19 insertions(+), 20 deletions(-) diff --git a/window/src/os/wayland/cursor_shape.rs b/window/src/os/wayland/cursor_shape.rs index 81e051a64..a710bf350 100644 --- a/window/src/os/wayland/cursor_shape.rs +++ b/window/src/os/wayland/cursor_shape.rs @@ -9,24 +9,24 @@ pub(super) struct CursorShapeManagerState {} impl Dispatch for CursorShapeManagerState { fn event( - state: &mut WaylandState, - proxy: &WpCursorShapeManagerV1, - event: ::Event, - data: &GlobalData, - conn: &wayland_client::Connection, - qhandle: &wayland_client::QueueHandle, + _state: &mut WaylandState, + _proxy: &WpCursorShapeManagerV1, + _event: ::Event, + _data: &GlobalData, + _conn: &wayland_client::Connection, + _qhandle: &wayland_client::QueueHandle, ) { todo!() } } impl Dispatch for CursorShapeManagerState { fn event( - state: &mut WaylandState, - proxy: &WpCursorShapeDeviceV1, - event: ::Event, - data: &GlobalData, - conn: &wayland_client::Connection, - qhandle: &wayland_client::QueueHandle, + _state: &mut WaylandState, + _proxy: &WpCursorShapeDeviceV1, + _event: ::Event, + _data: &GlobalData, + _conn: &wayland_client::Connection, + _qhandle: &wayland_client::QueueHandle, ) { todo!() } diff --git a/window/src/os/wayland/data_device.rs b/window/src/os/wayland/data_device.rs index e43d3b802..201f25d61 100644 --- a/window/src/os/wayland/data_device.rs +++ b/window/src/os/wayland/data_device.rs @@ -25,7 +25,7 @@ impl DataDeviceHandler for WaylandState { &mut self, _conn: &wayland_client::Connection, _qh: &wayland_client::QueueHandle, - data_device: &WlDataDevice, + _data_device: &WlDataDevice, ) { let offer = self .data_device @@ -95,7 +95,7 @@ impl DataDeviceHandler for WaylandState { &mut self, _conn: &wayland_client::Connection, _qh: &wayland_client::QueueHandle, - data_device: &WlDataDevice, + _data_device: &WlDataDevice, ) { let offer = self .data_device diff --git a/window/src/os/wayland/window.rs b/window/src/os/wayland/window.rs index 8ef5b09f4..be8382574 100644 --- a/window/src/os/wayland/window.rs +++ b/window/src/os/wayland/window.rs @@ -904,8 +904,7 @@ impl WaylandWindowInner { fn set_cursor(&mut self, cursor: Option) { let conn = Connection::get().unwrap().wayland(); let state = conn.wayland_state.borrow_mut(); - let (shm, pointer) = - RefMut::map_split(state, |s| (&mut s.shm, s.pointer.as_mut().unwrap())); + let pointer = RefMut::map(state, |s| s.pointer.as_mut().unwrap()); if let Err(err) = match cursor { Some(cursor) => pointer.set_cursor( @@ -1280,10 +1279,10 @@ impl CompositorHandler for WaylandState { fn transform_changed( &mut self, - conn: &WConnection, - qh: &wayland_client::QueueHandle, - surface: &wayland_client::protocol::wl_surface::WlSurface, - new_transform: wayland_client::protocol::wl_output::Transform, + _conn: &WConnection, + _qh: &wayland_client::QueueHandle, + _surface: &wayland_client::protocol::wl_surface::WlSurface, + _new_transform: wayland_client::protocol::wl_output::Transform, ) { // TODO: do we need to do anything here? }