Skip to content

Commit f5e1f47

Browse files
committed
Fix a warning.
1 parent d5fcee8 commit f5e1f47

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/mem/impls.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ unsafe fn read_usize_unaligned(x: *const usize) -> usize {
3030
// Do not use `core::ptr::read_unaligned` here, since it calls `copy_nonoverlapping` which
3131
// is translated to memcpy in LLVM.
3232
let x_read = (x as *const [u8; core::mem::size_of::<usize>()]).read();
33-
core::mem::transmute(x_read)
33+
usize::from_ne_bytes(x_read)
3434
}
3535

3636
#[inline(always)]

0 commit comments

Comments
 (0)