Method lrs::vec::Vec::set_len

Sets the length of the vector.

Syntax

impl<T, H> Vec<T, H>
    where H: Allocator,
{
    unsafe fn set_len(&mut self, len: usize) -> ()
}

Arguments

NameDescription
len

The new length of the vector.

Remarks

If len is greater than the current capacity of the vector, the process is aborted.