From 17066870cd5c5ad367a0232501f6c8d71b4ddea5 Mon Sep 17 00:00:00 2001 From: Johannes Lade Date: Thu, 15 Feb 2024 17:33:37 +0100 Subject: [PATCH] Fix typo in VecDeque::handle_capacity_increase() doc comment. Strategies B and C both show a full buffer before the capacity increase, while strategy A had one empty element left. Filled the last element in. --- 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 d062587b8f533..bcba6525fda15 100644 --- a/library/alloc/src/collections/vec_deque/mod.rs +++ b/library/alloc/src/collections/vec_deque/mod.rs @@ -485,10 +485,10 @@ impl VecDeque { // H := head // L := last element (`self.to_physical_idx(self.len - 1)`) // - // H L - // [o o o o o o o . ] - // H L - // A [o o o o o o o . . . . . . . . . ] + // H L + // [o o o o o o o o ] + // H L + // A [o o o o o o o o . . . . . . . . ] // L H // [o o o o o o o o ] // H L