Skip to content

Commit

Permalink
Clarify explanation of 'fn resize'
Browse files Browse the repository at this point in the history
1. Clarified on what should implement 'Clone' trait.
2. Minor grammar fix:
to be able clone => to be able to clone
  • Loading branch information
JOE1994 committed Feb 29, 2020
1 parent 0eb878d commit 2ad52cd
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/liballoc/vec.rs
Expand Up @@ -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
Expand Down

0 comments on commit 2ad52cd

Please sign in to comment.