Skip to content

Commit 55d0a8b

Browse files
authored
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
2 parents 6fc73bc + 6e265c5 commit 55d0a8b

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/liballoc/vec.rs

+3-2
Original file line numberDiff line numberDiff line change
@@ -1476,8 +1476,9 @@ impl<T: Clone> Vec<T> {
14761476
/// difference, with each additional slot filled with `value`.
14771477
/// If `new_len` is less than `len`, the `Vec` is simply truncated.
14781478
///
1479-
/// This method requires [`Clone`] to be able clone the passed value. If
1480-
/// you need more flexibility (or want to rely on [`Default`] instead of
1479+
/// This method requires `T` to implement [`Clone`],
1480+
/// in order to be able to clone the passed value.
1481+
/// If you need more flexibility (or want to rely on [`Default`] instead of
14811482
/// [`Clone`]), use [`resize_with`].
14821483
///
14831484
/// # Examples

0 commit comments

Comments
 (0)