From 3ca0c16bc1111dc7a8f5ecd142a1d3bc14a7b19e Mon Sep 17 00:00:00 2001 From: Micah Johnston Date: Wed, 9 Oct 2024 23:31:36 -0500 Subject: [PATCH] fix clippy lint for missing transmute annotations --- src/gl/x11.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/gl/x11.rs b/src/gl/x11.rs index d449801..724c743 100644 --- a/src/gl/x11.rs +++ b/src/gl/x11.rs @@ -86,22 +86,22 @@ impl GlContext { errors::XErrorHandler::handle(display, |error_handler| { #[allow(non_snake_case)] - let glXCreateContextAttribsARB: GlXCreateContextAttribsARB = { + let glXCreateContextAttribsARB = { let addr = get_proc_address("glXCreateContextAttribsARB"); if addr.is_null() { return Err(GlError::CreationFailed(CreationFailedError::GetProcAddressFailed)); } else { - std::mem::transmute(addr) + std::mem::transmute::<*const c_void, GlXCreateContextAttribsARB>(addr) } }; #[allow(non_snake_case)] - let glXSwapIntervalEXT: GlXSwapIntervalEXT = { + let glXSwapIntervalEXT = { let addr = get_proc_address("glXSwapIntervalEXT"); if addr.is_null() { return Err(GlError::CreationFailed(CreationFailedError::GetProcAddressFailed)); } else { - std::mem::transmute(addr) + std::mem::transmute::<*const c_void, GlXSwapIntervalEXT>(addr) } };