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
@ -492,11 +492,11 @@ unsafe fn handle_capacity_increase(&mut self, old_capacity: usize) {
|
|||||||
// L H
|
// L H
|
||||||
// [o o o o o o o o ]
|
// [o o o o o o o o ]
|
||||||
// H L
|
// H L
|
||||||
// B [. . . o o o o o o o . . . . . . ]
|
// B [. . . o o o o o o o o . . . . . ]
|
||||||
// L H
|
// L H
|
||||||
// [o o o o o o o o ]
|
// [o o o o o o o o ]
|
||||||
// L H
|
// L H
|
||||||
// C [o o o o o . . . . . . . . . o o ]
|
// C [o o o o o o . . . . . . . . o o ]
|
||||||
|
|
||||||
// can't use is_contiguous() because the capacity is already updated.
|
// can't use is_contiguous() because the capacity is already updated.
|
||||||
if self.head <= old_capacity - self.len {
|
if self.head <= old_capacity - self.len {
|
||||||
|
Loading…
Reference in New Issue
Block a user