diff options
| author | Youngsuk Kim <joseph942010@gmail.com> | 2020-02-28 19:28:26 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-02-28 19:28:26 -0500 |
| commit | 2ad52cd16d9535383bfabaf47a56bf80858b91b0 (patch) | |
| tree | e91045c26a6fa905159a187bfafd902274f303fa /src/liballoc | |
| parent | 0eb878d2aa6e3a1cb315f3f328681b26bb4bffdb (diff) | |
| download | rust-2ad52cd16d9535383bfabaf47a56bf80858b91b0.tar.gz rust-2ad52cd16d9535383bfabaf47a56bf80858b91b0.zip | |
Clarify explanation of '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 29987ac44e6..bcbf931d162 100644 --- a/src/liballoc/vec.rs +++ b/src/liballoc/vec.rs @@ -1472,8 +1472,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 `value` 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 |
