Skip to content

Commit

Permalink
Unrolled build for rust-lang#119205
Browse files Browse the repository at this point in the history
Rollup merge of rust-lang#119205 - mumbleskates:vecdeque-comment-fix, r=Mark-Simulacrum

fix minor mistake in comments describing VecDeque resizing

Avoiding confusion where one of the items in the deque seems to disappear in two of the three cases
  • Loading branch information
rust-timer authored Dec 24, 2023
2 parents cdd6374 + f2e711e commit fd3372f
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 fd3372f

Please sign in to comment.