Skip to content

Commit c98804d

Browse files
committed
deque: Fix miri error due to too small raw pointer borrow.
`&mut buffer[0]` only grants access to the first item, we need access to the entire buffer.
1 parent 350e112 commit c98804d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/deque.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -350,7 +350,7 @@ impl<T, const N: usize> Deque<T, N> {
350350
let done = self.is_empty();
351351
IterMut {
352352
_phantom: PhantomData,
353-
buffer: &mut self.buffer[0] as *mut MaybeUninit<T>,
353+
buffer: &mut self.buffer as *mut _ as *mut MaybeUninit<T>,
354354
front: self.front,
355355
back: self.back,
356356
done,

0 commit comments

Comments
 (0)