fix minor mistake in comments describing VecDeque resizing

This commit is contained in:
Kent Ross 2023-12-21 15:17:53 -08:00
parent 3d0e6bed60
commit f2e711e4c2

View File

@ -491,12 +491,12 @@ impl<T, A: Allocator> VecDeque<T, A> {
// 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 {