Skip to content

Commit

Permalink
Fix previous.
Browse files Browse the repository at this point in the history
  • Loading branch information
caibear committed Mar 28, 2024
1 parent 18d3908 commit 78dc89b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion library/alloc/src/collections/vec_deque/mod.rs
Expand Up @@ -2086,9 +2086,10 @@ impl<T, A: Allocator> VecDeque<T, A> {
// Extend or possibly remove this assertion when valid use-cases for growing the
// buffer without it being full emerge
debug_assert!(self.is_full());
let old_cap = self.capacity();
self.buf.reserve_for_push();
unsafe {
self.handle_capacity_increase(self.capacity());
self.handle_capacity_increase(old_cap);
}
debug_assert!(!self.is_full());
}
Expand Down

0 comments on commit 78dc89b

Please sign in to comment.