Rollup merge of #119205 - mumbleskates:vecdeque-comment-fix, r=Mark-Simulacrum
fix minor mistake in comments describing VecDeque resizing Avoiding confusion where one of the items in the deque seems to disappear in two of the three cases
This commit is contained in:
commit
89c3236789
@ -491,12 +491,12 @@ unsafe fn handle_capacity_increase(&mut self, old_capacity: usize) {
|
||||
// A [o o o o o o o . . . . . . . . . ]
|
||||
// L H
|
||||
// [o o o o o o o o ]
|
||||
// H L
|
||||
// B [. . . o o o o o o o . . . . . . ]
|
||||
// H L
|
||||
// B [. . . o o o o o o o o . . . . . ]
|
||||
// L H
|
||||
// [o o o o o o o o ]
|
||||
// L H
|
||||
// C [o o o o o . . . . . . . . . o o ]
|
||||
// L H
|
||||
// C [o o o o o o . . . . . . . . o o ]
|
||||
|
||||
// can't use is_contiguous() because the capacity is already updated.
|
||||
if self.head <= old_capacity - self.len {
|
||||
|
Loading…
Reference in New Issue
Block a user