about summary refs log tree commit diff
diff options
context:
space:
mode:
authorJohannes Lade <johannes.lade@yahoo.com>2024-02-15 17:33:37 +0100
committerGitHub <noreply@github.com>2024-02-15 17:33:37 +0100
commit17066870cd5c5ad367a0232501f6c8d71b4ddea5 (patch)
tree2da52f9bec5e45c75d60a2955894a4e9ae710463
parentfa9f77ff35b4b63ed0cef9a9642c8f881b33f14f (diff)
downloadrust-17066870cd5c5ad367a0232501f6c8d71b4ddea5.tar.gz
rust-17066870cd5c5ad367a0232501f6c8d71b4ddea5.zip
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.
-rw-r--r--library/alloc/src/collections/vec_deque/mod.rs8
1 files 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 d062587b8f5..bcba6525fda 100644
--- a/library/alloc/src/collections/vec_deque/mod.rs
+++ b/library/alloc/src/collections/vec_deque/mod.rs
@@ -485,10 +485,10 @@ impl<T, A: Allocator> VecDeque<T, A> {
         // 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