Skip to content

Commit 21708e9

Browse files
authored
Workaround for integer_to_ptr_transmutes warning (#3731)
1 parent 2ae1a52 commit 21708e9

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

crates/libs/core/src/imp/weak_ref_count.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,10 @@ impl TearOff {
155155
}
156156

157157
unsafe fn decode<'a>(value: isize) -> &'a mut Self {
158-
unsafe { transmute(value << 1) }
158+
#[allow(unknown_lints, integer_to_ptr_transmutes)]
159+
unsafe {
160+
transmute(value << 1)
161+
}
159162
}
160163

161164
unsafe fn query_interface(&self, iid: *const GUID, interface: *mut *mut c_void) -> HRESULT {

0 commit comments

Comments
 (0)