about summary refs log tree commit diff
diff options
context:
space:
mode:
authorMarkus Everling <markuseverling@gmail.com>2023-02-26 02:33:34 +0100
committerMarkus Everling <markuseverling@gmail.com>2023-02-26 03:13:56 +0100
commit4a4f43e4e9b994c729a0506d921fe9734673a20a (patch)
tree329d05aa90df2b1d718b771804e84ca0d9c1d038
parent9e22516877a2853c71456ef792fcbd9087fb905a (diff)
downloadrust-4a4f43e4e9b994c729a0506d921fe9734673a20a.tar.gz
rust-4a4f43e4e9b994c729a0506d921fe9734673a20a.zip
Disambiguate comments
-rw-r--r--library/alloc/src/collections/vec_deque/mod.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/library/alloc/src/collections/vec_deque/mod.rs b/library/alloc/src/collections/vec_deque/mod.rs
index b30449ed06a..d4a12509b1c 100644
--- a/library/alloc/src/collections/vec_deque/mod.rs
+++ b/library/alloc/src/collections/vec_deque/mod.rs
@@ -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.
 
@@ -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`.
             //