mirror of
https://github.com/rust-lang/rust.git
synced 2025-02-24 12:54:00 +00:00
Fix previous.
This commit is contained in:
parent
18d390883e
commit
78dc89b0d5
@ -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());
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user