Skip to content

Commit 1706687

Browse files
authored
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.
1 parent fa9f77f commit 1706687

File tree

1 file changed

+4
-4
lines changed
  • library/alloc/src/collections/vec_deque

1 file changed

+4
-4
lines changed

library/alloc/src/collections/vec_deque/mod.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -485,10 +485,10 @@ impl<T, A: Allocator> VecDeque<T, A> {
485485
// H := head
486486
// L := last element (`self.to_physical_idx(self.len - 1)`)
487487
//
488-
// H L
489-
// [o o o o o o o . ]
490-
// H L
491-
// A [o o o o o o o . . . . . . . . . ]
488+
// H L
489+
// [o o o o o o o o ]
490+
// H L
491+
// A [o o o o o o o o . . . . . . . . ]
492492
// L H
493493
// [o o o o o o o o ]
494494
// H L

0 commit comments

Comments
 (0)