parent
daa8792f17
commit
7b6cf6e87b
3 changed files with 2 additions and 7 deletions
|
@ -1241,8 +1241,6 @@ impl<T> Vec<T> {
|
|||
/// # Examples
|
||||
///
|
||||
/// ```
|
||||
/// #![feature(vec_resize_with)]
|
||||
///
|
||||
/// let mut vec = vec![1, 2, 3];
|
||||
/// vec.resize_with(5, Default::default);
|
||||
/// assert_eq!(vec, [1, 2, 3, 0, 0]);
|
||||
|
@ -1255,7 +1253,7 @@ impl<T> Vec<T> {
|
|||
///
|
||||
/// [`resize`]: #method.resize
|
||||
/// [`Clone`]: ../../std/clone/trait.Clone.html
|
||||
#[unstable(feature = "vec_resize_with", issue = "41758")]
|
||||
#[stable(feature = "vec_resize_with", since = "1.33.0")]
|
||||
pub fn resize_with<F>(&mut self, new_len: usize, f: F)
|
||||
where F: FnMut() -> T
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue