Skip to content

Commit 3670b50

Browse files
committed
feat: add unsafe
1 parent 17dd2e4 commit 3670b50

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ impl<T> Producer<T> {
150150
target_arch = "x86",
151151
all(target_arch = "x86_64", target_feature = "sse")
152152
))]
153-
{
153+
unsafe {
154154
let next_index = next_head & self.queue.mask.0;
155155
let next_slot = self.queue.buffer.0.add(next_index);
156156
prefetch_write(next_slot as *const u8);
@@ -222,7 +222,7 @@ impl<T> Consumer<T> {
222222
target_arch = "x86",
223223
all(target_arch = "x86_64", target_feature = "sse")
224224
))]
225-
{
225+
unsafe {
226226
let next_index = (tail + 1) & self.queue.mask.0;
227227
let next_slot = self.queue.buffer.0.add(next_index);
228228
prefetch_read(next_slot as *const u8);

0 commit comments

Comments
 (0)