From 93364befcc67fec99405c08b957acf9d726d121c Mon Sep 17 00:00:00 2001 From: Maximiliano Sandoval Date: Thu, 31 Oct 2024 22:42:54 +0100 Subject: [PATCH] fixup! activation_token: Provide GTK 4 helper Use as const as mut, this fixes a clippy lint that could have been seen with cargo clippy --features=gtk4 -- -W clippy::cast-ptr-alignment --- src/activation_token/gtk4.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/activation_token/gtk4.rs b/src/activation_token/gtk4.rs index 36be3f87b..7f8e13c7c 100644 --- a/src/activation_token/gtk4.rs +++ b/src/activation_token/gtk4.rs @@ -24,7 +24,7 @@ impl ActivationToken { if glib::check_version(2, 82, 0).is_some() { unsafe { let klass: *mut gtk4::gio::ffi::GAppLaunchContextClass = - std::ptr::addr_of!((*context.class().parent()?)) as *mut _; + &context.class().parent()? as *const _ as *mut _; let get_startup_notify_id = (*klass).get_startup_notify_id.as_ref()?; from_glib_full::<_, Option>(get_startup_notify_id( context.as_ptr().cast(),