about summary refs log tree commit diff
path: root/src/liballoc
diff options
context:
space:
mode:
authorMahmoud Al-Qudsi <mqudsi@neosmart.net>2019-11-16 14:11:08 -0600
committerMahmoud Al-Qudsi <mqudsi@neosmart.net>2019-11-16 14:15:07 -0600
commita36c3f6f68f969da1141572531e140229bda4301 (patch)
tree7d0c96fbcab272456cff46f53966d09237dc0b40 /src/liballoc
parent8c7530ade81b14d48ebc7cdd5e5fbdc0d9612bbe (diff)
downloadrust-a36c3f6f68f969da1141572531e140229bda4301.tar.gz
rust-a36c3f6f68f969da1141572531e140229bda4301.zip
Revise the text of `vec::split_off()` per review in #65739
Remove the incorrect usage of "copy" as the trait is not called.
Diffstat (limited to 'src/liballoc')
-rw-r--r--src/liballoc/vec.rs7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/liballoc/vec.rs b/src/liballoc/vec.rs
index 963b012c711..07e4358d644 100644
--- a/src/liballoc/vec.rs
+++ b/src/liballoc/vec.rs
@@ -1333,10 +1333,9 @@ impl<T> Vec<T> {
 
     /// Splits the collection into two at the given index.
     ///
-    /// Copies the range from `[at, len)` to a newly allocated `Self`
-    /// and returns the result. The original `Self` will contain the
-    /// range from `[0, at)`. Note that the capacity of `self` does
-    /// not change.
+    /// Returns a newly allocated vector containing the elements in the range
+    /// `[at, len)`. After the call, the original vector will be left containing
+    /// the elements `[0, at)` with its previous capacity unchanged.
     ///
     /// # Panics
     ///