Skip to content

Commit 2ad52cd

Browse files
authored
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
1 parent 0eb878d commit 2ad52cd

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/liballoc/vec.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1472,8 +1472,9 @@ impl<T: Clone> Vec<T> {
14721472
/// difference, with each additional slot filled with `value`.
14731473
/// If `new_len` is less than `len`, the `Vec` is simply truncated.
14741474
///
1475-
/// This method requires [`Clone`] to be able clone the passed value. If
1476-
/// you need more flexibility (or want to rely on [`Default`] instead of
1475+
/// This method requires `value` to implement [`Clone`],
1476+
/// in order to be able to clone the passed value.
1477+
/// If you need more flexibility (or want to rely on [`Default`] instead of
14771478
/// [`Clone`]), use [`resize_with`].
14781479
///
14791480
/// # Examples

0 commit comments

Comments
 (0)