about summary refs log tree commit diff
path: root/src/liballoc
diff options
context:
space:
mode:
authorDylan DPC <dylan.dpc@gmail.com>2020-03-01 17:23:29 +0100
committerGitHub <noreply@github.com>2020-03-01 17:23:29 +0100
commit55d0a8b201c0b266be48723c30e4794a0068e96e (patch)
treec99444311f2096d39b40d486f667f0d4889214bf /src/liballoc
parent6fc73bc10a72d0e4475f8ab60e9902bddc03c1f6 (diff)
parent6e265c5bc58ddf830445054907c69369d6b84162 (diff)
downloadrust-55d0a8b201c0b266be48723c30e4794a0068e96e.tar.gz
rust-55d0a8b201c0b266be48723c30e4794a0068e96e.zip
Rollup merge of #69568 - JOE1994:patch-2, r=Dylan-DPC
Clarify explanation of Vec<T> 'fn resize'

1. Clarified on what should implement `Clone` trait.
2. Minor grammar fix:
to be able clone => to be able **to** clone
Diffstat (limited to 'src/liballoc')
-rw-r--r--src/liballoc/vec.rs5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/liballoc/vec.rs b/src/liballoc/vec.rs
index fc50d06b33c..3fd7be06fd4 100644
--- a/src/liballoc/vec.rs
+++ b/src/liballoc/vec.rs
@@ -1476,8 +1476,9 @@ impl<T: Clone> Vec<T> {
     /// difference, with each additional slot filled with `value`.
     /// If `new_len` is less than `len`, the `Vec` is simply truncated.
     ///
-    /// This method requires [`Clone`] to be able clone the passed value. If
-    /// you need more flexibility (or want to rely on [`Default`] instead of
+    /// This method requires `T` to implement [`Clone`],
+    /// in order to be able to clone the passed value.
+    /// If you need more flexibility (or want to rely on [`Default`] instead of
     /// [`Clone`]), use [`resize_with`].
     ///
     /// # Examples