Skip to content

Commit 62eb23d

Browse files
committed
remove unsafe
1 parent 6e84cdd commit 62eb23d

File tree

1 file changed

+1
-11
lines changed

1 file changed

+1
-11
lines changed

src/lib.rs

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -427,16 +427,7 @@ macro_rules! load_v {
427427
std::ptr::copy_nonoverlapping($sptr, $placeholder[..].as_mut_ptr(), $nb);
428428
load($placeholder[..].as_ptr())
429429
} else {
430-
#[cfg(not(debug_assertions))]
431-
{
432-
// disable memory sanitizer here
433-
load($sptr)
434-
}
435-
#[cfg(debug_assertions)]
436-
{
437-
std::ptr::copy_nonoverlapping($sptr, $placeholder[..].as_mut_ptr(), $nb);
438-
load($placeholder[..].as_ptr())
439-
}
430+
load($sptr)
440431
}
441432
}
442433
}};
@@ -614,7 +605,6 @@ fn format_string(value: &str, dst: &mut [u8]) -> usize {
614605
}
615606
} else if has_avx2 {
616607
const LANES: usize = simd::avx2::Simd256u::LANES;
617-
// Scratch buffer reused for mask materialisation; stay uninitialised.
618608
let mut placeholder: [u8; LANES] = [0; LANES];
619609
while nb > 0 {
620610
v_avx2 = load_v!(placeholder, sptr, nb);

0 commit comments

Comments
 (0)