From f2e711e4c22a2fec34b6a1e61499a09a071a84e4 Mon Sep 17 00:00:00 2001 From: Kent Ross Date: Thu, 21 Dec 2023 15:17:53 -0800 Subject: [PATCH] fix minor mistake in comments describing VecDeque resizing --- library/alloc/src/collections/vec_deque/mod.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/library/alloc/src/collections/vec_deque/mod.rs b/library/alloc/src/collections/vec_deque/mod.rs index 4ef8af9b03475..d062587b8f533 100644 --- a/library/alloc/src/collections/vec_deque/mod.rs +++ b/library/alloc/src/collections/vec_deque/mod.rs @@ -491,12 +491,12 @@ impl VecDeque { // 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 {