Skip to content

Commit 5450176

Browse files
committed
fix: replace swap_bytes with to_be
1 parent b18e0a8 commit 5450176

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/simd.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -332,7 +332,7 @@ pub fn read_u64_be_simd(data: &[u8]) -> u64 {
332332
{
333333
if data.len() >= 8 && is_avx512_available() {
334334
let v = unsafe { std::ptr::read_unaligned(data.as_ptr() as *const u64) };
335-
rv = Some(v.swap_bytes());
335+
rv = Some(v.to_be());
336336
}
337337
}
338338
}
@@ -767,7 +767,7 @@ pub fn read_u64_be_avx512(data: &[u8]) -> u64 {
767767
if is_avx512_available() && data.len() >= 8 {
768768
unsafe {
769769
let v = std::ptr::read_unaligned(data.as_ptr() as *const u64);
770-
return v.swap_bytes();
770+
return v.to_be();
771771
}
772772
}
773773
read_u64_be_simd(data)

0 commit comments

Comments
 (0)