diff options
| author | Matthias Krüger <matthias.krueger@famsik.de> | 2023-12-24 01:08:09 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-12-24 01:08:09 +0100 |
| commit | 89c3236789ec4fc25531bbd859eac5b1a4a4bd00 (patch) | |
| tree | 801152af86408bf852d16a8988b9615fa4d0c965 | |
| parent | 09131a2e31592748be55974a6943709429f64714 (diff) | |
| parent | f2e711e4c22a2fec34b6a1e61499a09a071a84e4 (diff) | |
| download | rust-89c3236789ec4fc25531bbd859eac5b1a4a4bd00.tar.gz rust-89c3236789ec4fc25531bbd859eac5b1a4a4bd00.zip | |
Rollup merge of #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
| -rw-r--r-- | library/alloc/src/collections/vec_deque/mod.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/library/alloc/src/collections/vec_deque/mod.rs b/library/alloc/src/collections/vec_deque/mod.rs index 4ef8af9b034..d062587b8f5 100644 --- a/library/alloc/src/collections/vec_deque/mod.rs +++ b/library/alloc/src/collections/vec_deque/mod.rs @@ -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 { |
