Skip to content

Commit

Permalink
fix clippy lint for missing transmute annotations
Browse files Browse the repository at this point in the history
  • Loading branch information
glowcoil committed Oct 10, 2024
1 parent 579130e commit 3ca0c16
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/gl/x11.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
};

Expand Down

0 comments on commit 3ca0c16

Please sign in to comment.