Skip to content

Commit

Permalink
fix minor mistake in comments describing VecDeque resizing
Browse files Browse the repository at this point in the history
  • Loading branch information
mumbleskates committed Dec 21, 2023
1 parent 3d0e6be commit f2e711e
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 @@ -491,12 +491,12 @@ impl<T, A: Allocator> VecDeque<T, A> {
// 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 {
Expand Down

0 comments on commit f2e711e

Please sign in to comment.