about summary refs log tree commit diff
diff options
context:
space:
mode:
authorStephen E. Baker <baker.stephen.e@gmail.com>2017-01-17 14:39:16 -0500
committerGitHub <noreply@github.com>2017-01-17 14:39:16 -0500
commit3d85f73def1869b971399bfcef7fa71cf2d83163 (patch)
tree83e585bb1054129ead20ab5f83b7d124204ad1e5
parentaedebfe77de30675826505572f36767e77dfba90 (diff)
downloadrust-3d85f73def1869b971399bfcef7fa71cf2d83163.tar.gz
rust-3d85f73def1869b971399bfcef7fa71cf2d83163.zip
Clarify when range is removed by drain
Based on a discussion on #rust-beginners the existing note for drain is confusing. This new wording was suggested.
-rw-r--r--src/libcollections/vec.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libcollections/vec.rs b/src/libcollections/vec.rs
index 4b05f8062e8..c5b904c8a2f 100644
--- a/src/libcollections/vec.rs
+++ b/src/libcollections/vec.rs
@@ -1023,8 +1023,8 @@ impl<T> Vec<T> {
     /// Create a draining iterator that removes the specified range in the vector
     /// and yields the removed items.
     ///
-    /// Note 1: The element range is removed even if the iterator is not
-    /// consumed until the end.
+    /// Note 1: The element range is removed even if the iterator is only
+    /// partially consumed or not consumed at all.
     ///
     /// Note 2: It is unspecified how many elements are removed from the vector,
     /// if the `Drain` value is leaked.