Skip to content

Commit

Permalink
Make Miri happy
Browse files Browse the repository at this point in the history
  • Loading branch information
honzasp committed Aug 15, 2024
1 parent ba03cda commit bbd5ae5
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/deque.rs
Original file line number Diff line number Diff line change
Expand Up @@ -731,8 +731,9 @@ impl<T, S: Storage> DequeInner<T, S> {
let idx_j = self.to_physical_index(j);

let buffer = self.buffer.borrow_mut();
let ptr_i = buffer.as_mut_ptr().add(idx_i);
let ptr_j = buffer.as_mut_ptr().add(idx_j);
let buffer_ptr = buffer.as_mut_ptr();
let ptr_i = buffer_ptr.add(idx_i);
let ptr_j = buffer_ptr.add(idx_j);
ptr::swap(ptr_i, ptr_j);
}

Expand Down

0 comments on commit bbd5ae5

Please sign in to comment.