Skip to content

Commit f6404f3

Browse files
authored
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
2 parents 5cf9199 + 1e5c2c3 commit f6404f3

File tree

1 file changed

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

1 file changed

+4
-4
lines changed

alloc/src/collections/vec_deque/mod.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -491,12 +491,12 @@ impl<T, A: Allocator> VecDeque<T, A> {
491491
// A [o o o o o o o . . . . . . . . . ]
492492
// L H
493493
// [o o o o o o o o ]
494-
// H L
495-
// B [. . . o o o o o o o . . . . . . ]
494+
// H L
495+
// B [. . . o o o o o o o o . . . . . ]
496496
// L H
497497
// [o o o o o o o o ]
498-
// L H
499-
// C [o o o o o . . . . . . . . . o o ]
498+
// L H
499+
// C [o o o o o o . . . . . . . . o o ]
500500

501501
// can't use is_contiguous() because the capacity is already updated.
502502
if self.head <= old_capacity - self.len {

0 commit comments

Comments
 (0)