Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions library/alloc/src/collections/vec_deque/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2479,11 +2479,11 @@ impl<T, A: Allocator> VecDeque<T, A> {
let other_len = len - at;
let mut other = VecDeque::with_capacity_in(other_len, self.allocator().clone());

unsafe {
let (first_half, second_half) = self.as_slices();
let (first_half, second_half) = self.as_slices();
let first_len = first_half.len();
let second_len = second_half.len();

let first_len = first_half.len();
let second_len = second_half.len();
unsafe {
if at < first_len {
// `at` lies in the first half.
let amount_in_first = first_len - at;
Expand Down
Loading