Skip to content

Commit 78dc89b

Browse files
committed
Fix previous.
1 parent 18d3908 commit 78dc89b

File tree

1 file changed

+2
-1
lines changed
  • library/alloc/src/collections/vec_deque

1 file changed

+2
-1
lines changed

library/alloc/src/collections/vec_deque/mod.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -2086,9 +2086,10 @@ impl<T, A: Allocator> VecDeque<T, A> {
20862086
// Extend or possibly remove this assertion when valid use-cases for growing the
20872087
// buffer without it being full emerge
20882088
debug_assert!(self.is_full());
2089+
let old_cap = self.capacity();
20892090
self.buf.reserve_for_push();
20902091
unsafe {
2091-
self.handle_capacity_increase(self.capacity());
2092+
self.handle_capacity_increase(old_cap);
20922093
}
20932094
debug_assert!(!self.is_full());
20942095
}

0 commit comments

Comments
 (0)