diff options
| author | Dylan DPC <dylan.dpc@gmail.com> | 2020-03-01 17:23:29 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-03-01 17:23:29 +0100 |
| commit | 55d0a8b201c0b266be48723c30e4794a0068e96e (patch) | |
| tree | c99444311f2096d39b40d486f667f0d4889214bf /src/liballoc | |
| parent | 6fc73bc10a72d0e4475f8ab60e9902bddc03c1f6 (diff) | |
| parent | 6e265c5bc58ddf830445054907c69369d6b84162 (diff) | |
| download | rust-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.rs | 5 |
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 |
