Method lrs::vec::Vec::truncate

Reduces the length of the vector.

Syntax

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

Arguments

NameDescription
len

The new length of the vector.

Remarks

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