diff --git a/library/alloc/src/collections/vec_deque/mod.rs b/library/alloc/src/collections/vec_deque/mod.rs index 4ef8af9b034..d062587b8f5 100644 --- a/library/alloc/src/collections/vec_deque/mod.rs +++ b/library/alloc/src/collections/vec_deque/mod.rs @@ -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 {