From cd6a54c66e9c3e826925c5f3bde52929aea52b5f Mon Sep 17 00:00:00 2001 From: Bilal Elmoussaoui Date: Sat, 19 Oct 2024 09:45:22 +0200 Subject: [PATCH] gdk/win32: Fix clippy warnings --- gdk4-win32/src/lib.rs | 10 ++++------ gdk4-win32/src/win32_hcursor.rs | 2 +- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/gdk4-win32/src/lib.rs b/gdk4-win32/src/lib.rs index 205938b07e23..e4c779a2292d 100644 --- a/gdk4-win32/src/lib.rs +++ b/gdk4-win32/src/lib.rs @@ -4,8 +4,6 @@ #![allow(deprecated)] #![cfg_attr(docsrs, feature(doc_cfg))] -use std::ffi::c_void; - pub use gdk; pub use gdk4_win32_sys as ffi; pub use gio; @@ -32,13 +30,13 @@ mod win32_hcursor; mod win32_surface; #[cfg(not(all(feature = "win32", windows)))] -pub struct HANDLE(pub *mut c_void); +pub struct HANDLE(pub *mut std::ffi::c_void); #[cfg(not(all(feature = "win32", windows)))] -pub struct HCURSOR(pub *mut c_void); +pub struct HCURSOR(pub *mut std::ffi::c_void); #[cfg(not(all(feature = "win32", windows)))] -pub struct HICON(pub *mut c_void); +pub struct HICON(pub *mut std::ffi::c_void); #[cfg(not(all(feature = "win32", windows)))] -pub struct HWND(pub *mut c_void); +pub struct HWND(pub *mut std::ffi::c_void); #[cfg(not(all(feature = "win32", windows)))] #[repr(transparent)] diff --git a/gdk4-win32/src/win32_hcursor.rs b/gdk4-win32/src/win32_hcursor.rs index a93cc2d2e12f..0b6d8bfd92a1 100644 --- a/gdk4-win32/src/win32_hcursor.rs +++ b/gdk4-win32/src/win32_hcursor.rs @@ -25,6 +25,6 @@ impl Win32HCursor { pub fn handle(&self) -> HCURSOR { let ptr: NonNull = ObjectExt::property(self, "handle"); - HCURSOR(ptr.as_ptr() as *mut c_void) + HCURSOR(ptr.as_ptr()) } }