Skip to content

Commit 76c8455

Browse files
committed
fix clippy lint for missing transmute annotations
1 parent 579130e commit 76c8455

File tree

3 files changed

+7
-0
lines changed

3 files changed

+7
-0
lines changed

src/gl/win.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -160,6 +160,7 @@ impl GlContext {
160160
let symbol = CString::new("wglCreateContextAttribsARB").unwrap();
161161
let addr = wglGetProcAddress(symbol.as_ptr());
162162
if !addr.is_null() {
163+
#[allow(clippy::missing_transmute_annotations)]
163164
Some(std::mem::transmute(addr))
164165
} else {
165166
None
@@ -171,6 +172,7 @@ impl GlContext {
171172
let symbol = CString::new("wglChoosePixelFormatARB").unwrap();
172173
let addr = wglGetProcAddress(symbol.as_ptr());
173174
if !addr.is_null() {
175+
#[allow(clippy::missing_transmute_annotations)]
174176
Some(std::mem::transmute(addr))
175177
} else {
176178
None
@@ -182,6 +184,7 @@ impl GlContext {
182184
let symbol = CString::new("wglSwapIntervalEXT").unwrap();
183185
let addr = wglGetProcAddress(symbol.as_ptr());
184186
if !addr.is_null() {
187+
#[allow(clippy::missing_transmute_annotations)]
185188
Some(std::mem::transmute(addr))
186189
} else {
187190
None

src/gl/x11.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,7 @@ impl GlContext {
9191
if addr.is_null() {
9292
return Err(GlError::CreationFailed(CreationFailedError::GetProcAddressFailed));
9393
} else {
94+
#[allow(clippy::missing_transmute_annotations)]
9495
std::mem::transmute(addr)
9596
}
9697
};
@@ -101,6 +102,7 @@ impl GlContext {
101102
if addr.is_null() {
102103
return Err(GlError::CreationFailed(CreationFailedError::GetProcAddressFailed));
103104
} else {
105+
#[allow(clippy::missing_transmute_annotations)]
104106
std::mem::transmute(addr)
105107
}
106108
};

src/win/drop_target.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,8 @@ const DROP_PTR: unsafe extern "system" fn(
4747
pt: POINTL,
4848
pdwEffect: *mut DWORD,
4949
) -> HRESULT = DropTarget::drop;
50+
51+
#[allow(clippy::missing_transmute_annotations)]
5052
const DROP_TARGET_VTBL: IDropTargetVtbl = IDropTargetVtbl {
5153
parent: IUnknownVtbl {
5254
QueryInterface: DropTarget::query_interface,

0 commit comments

Comments
 (0)