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 76c8455
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/gl/win.rs
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,7 @@ impl GlContext {
let symbol = CString::new("wglCreateContextAttribsARB").unwrap();
let addr = wglGetProcAddress(symbol.as_ptr());
if !addr.is_null() {
#[allow(clippy::missing_transmute_annotations)]
Some(std::mem::transmute(addr))
} else {
None
Expand All @@ -171,6 +172,7 @@ impl GlContext {
let symbol = CString::new("wglChoosePixelFormatARB").unwrap();
let addr = wglGetProcAddress(symbol.as_ptr());
if !addr.is_null() {
#[allow(clippy::missing_transmute_annotations)]
Some(std::mem::transmute(addr))
} else {
None
Expand All @@ -182,6 +184,7 @@ impl GlContext {
let symbol = CString::new("wglSwapIntervalEXT").unwrap();
let addr = wglGetProcAddress(symbol.as_ptr());
if !addr.is_null() {
#[allow(clippy::missing_transmute_annotations)]
Some(std::mem::transmute(addr))
} else {
None
Expand Down
2 changes: 2 additions & 0 deletions src/gl/x11.rs
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ impl GlContext {
if addr.is_null() {
return Err(GlError::CreationFailed(CreationFailedError::GetProcAddressFailed));
} else {
#[allow(clippy::missing_transmute_annotations)]
std::mem::transmute(addr)
}
};
Expand All @@ -101,6 +102,7 @@ impl GlContext {
if addr.is_null() {
return Err(GlError::CreationFailed(CreationFailedError::GetProcAddressFailed));
} else {
#[allow(clippy::missing_transmute_annotations)]
std::mem::transmute(addr)
}
};
Expand Down
2 changes: 2 additions & 0 deletions src/win/drop_target.rs
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,8 @@ const DROP_PTR: unsafe extern "system" fn(
pt: POINTL,
pdwEffect: *mut DWORD,
) -> HRESULT = DropTarget::drop;

#[allow(clippy::missing_transmute_annotations)]
const DROP_TARGET_VTBL: IDropTargetVtbl = IDropTargetVtbl {
parent: IUnknownVtbl {
QueryInterface: DropTarget::query_interface,
Expand Down

0 comments on commit 76c8455

Please sign in to comment.