From a36c3f6f68f969da1141572531e140229bda4301 Mon Sep 17 00:00:00 2001 From: Mahmoud Al-Qudsi Date: Sat, 16 Nov 2019 14:11:08 -0600 Subject: Revise the text of `vec::split_off()` per review in #65739 Remove the incorrect usage of "copy" as the trait is not called. --- src/liballoc/vec.rs | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'src/liballoc') 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 Vec { /// 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 /// -- cgit 1.4.1-3-g733a5