Skip to content

Commit

Permalink
Disambiguate comments
Browse files Browse the repository at this point in the history
  • Loading branch information
Sp00ph committed Feb 26, 2023
1 parent 9e22516 commit 4a4f43e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions library/alloc/src/collections/vec_deque/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -947,7 +947,7 @@ impl<T, A: Allocator> VecDeque<T, A> {
// There are three cases of interest:
// All elements are out of desired bounds
// Elements are contiguous, and tail is out of desired bounds
// Elements are discontiguous, and head is out of desired bounds
// Elements are discontiguous
//
// At all other times, element positions are unaffected.

Expand Down Expand Up @@ -987,7 +987,7 @@ impl<T, A: Allocator> VecDeque<T, A> {
self.copy_nonoverlapping(target_cap, 0, len);
}
} else if !self.is_contiguous() {
// Head is out of bounds, tail is in bounds.
// The head slice is at least partially out of bounds, tail is in bounds.
// Copy the head backwards so it lines up with the target capacity.
// This won't overlap because `target_cap >= self.len`.
//
Expand Down

0 comments on commit 4a4f43e

Please sign in to comment.