Skip to content

Commit

Permalink
Fix typo in VecDeque::handle_capacity_increase() doc comment.
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
SebastianJL authored Feb 15, 2024
1 parent fa9f77f commit 1706687
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions library/alloc/src/collections/vec_deque/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 1706687

Please sign in to comment.