From c16891f16912d9db40e553157de6a97d4e642c6c Mon Sep 17 00:00:00 2001 From: glowcoil Date: Tue, 28 Oct 2025 09:02:15 -0500 Subject: [PATCH] address warnings from latest version of rustc --- src/win/drop_target.rs | 3 +++ src/win/window.rs | 8 ++++---- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/src/win/drop_target.rs b/src/win/drop_target.rs index 1b7835f1..b9ba5807 100644 --- a/src/win/drop_target.rs +++ b/src/win/drop_target.rs @@ -27,6 +27,7 @@ use super::WindowState; // These function pointers have to be stored in a (const) variable before they can be transmuted // Transmuting is needed because winapi has a bug where the pt parameter has an incorrect // type `*const POINTL` +#[allow(non_snake_case)] const DRAG_ENTER_PTR: unsafe extern "system" fn( this: *mut IDropTarget, pDataObj: *const IDataObject, @@ -34,12 +35,14 @@ const DRAG_ENTER_PTR: unsafe extern "system" fn( pt: POINTL, pdwEffect: *mut DWORD, ) -> HRESULT = DropTarget::drag_enter; +#[allow(non_snake_case)] const DRAG_OVER_PTR: unsafe extern "system" fn( this: *mut IDropTarget, grfKeyState: DWORD, pt: POINTL, pdwEffect: *mut DWORD, ) -> HRESULT = DropTarget::drag_over; +#[allow(non_snake_case)] const DROP_PTR: unsafe extern "system" fn( this: *mut IDropTarget, pDataObj: *const IDataObject, diff --git a/src/win/window.rs b/src/win/window.rs index ac7824b9..c1c4b052 100644 --- a/src/win/window.rs +++ b/src/win/window.rs @@ -519,19 +519,19 @@ pub(super) struct WindowState { } impl WindowState { - pub(super) fn create_window(&self) -> Window { + pub(super) fn create_window(&self) -> Window<'_> { Window { state: self } } - pub(super) fn window_info(&self) -> Ref { + pub(super) fn window_info(&self) -> Ref<'_, WindowInfo> { self.window_info.borrow() } - pub(super) fn keyboard_state(&self) -> Ref { + pub(super) fn keyboard_state(&self) -> Ref<'_, KeyboardState> { self.keyboard_state.borrow() } - pub(super) fn handler_mut(&self) -> RefMut>> { + pub(super) fn handler_mut(&self) -> RefMut<'_, Option>> { self.handler.borrow_mut() }