Skip to content

Commit 11e9769

Browse files
authored
Rollup merge of #75875 - pickfire:patch-4, r=jyn514
Shorten liballoc vec resize intra-doc link r? @jyn514
2 parents c1cb46e + adc4925 commit 11e9769

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

library/alloc/src/vec.rs

+3-5
Original file line numberDiff line numberDiff line change
@@ -1456,9 +1456,9 @@ impl<T> Vec<T> {
14561456
/// If `new_len` is less than `len`, the `Vec` is simply truncated.
14571457
///
14581458
/// This method uses a closure to create new values on every push. If
1459-
/// you'd rather [`Clone`] a given value, use [`resize`]. If you want
1460-
/// to use the [`Default`] trait to generate values, you can pass
1461-
/// [`Default::default()`] as the second argument.
1459+
/// you'd rather [`Clone`] a given value, use [`Vec::resize`]. If you
1460+
/// want to use the [`Default`] trait to generate values, you can
1461+
/// pass [`Default::default`] as the second argument.
14621462
///
14631463
/// # Examples
14641464
///
@@ -1472,8 +1472,6 @@ impl<T> Vec<T> {
14721472
/// vec.resize_with(4, || { p *= 2; p });
14731473
/// assert_eq!(vec, [2, 4, 8, 16]);
14741474
/// ```
1475-
///
1476-
/// [`resize`]: Vec::resize
14771475
#[stable(feature = "vec_resize_with", since = "1.33.0")]
14781476
pub fn resize_with<F>(&mut self, new_len: usize, f: F)
14791477
where

0 commit comments

Comments
 (0)