We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 912a4dd commit df8f172Copy full SHA for df8f172
crates/core_arch/src/x86/sse42.rs
@@ -623,11 +623,7 @@ mod tests {
623
unsafe fn str_to_m128i(s: &[u8]) -> __m128i {
624
assert!(s.len() <= 16);
625
let slice = &mut [0u8; 16];
626
- ptr::copy_nonoverlapping(
627
- s.get_unchecked(0) as *const u8 as *const u8,
628
- slice.get_unchecked_mut(0) as *mut u8 as *mut u8,
629
- s.len(),
630
- );
+ ptr::copy_nonoverlapping(s.as_ptr(), slice.as_mut_ptr(), s.len());
631
_mm_loadu_si128(slice.as_ptr() as *const _)
632
}
633
0 commit comments