Add truncate note to Vec::resize

This commit is contained in:
Owen Gage 2021-09-30 17:21:03 +01:00
parent c6007fdc70
commit e8e7f6e05c

View file

@ -2116,6 +2116,7 @@ impl<T: Clone, A: Allocator> Vec<T, A> {
/// in order to be able to clone the passed value.
/// If you need more flexibility (or want to rely on [`Default`] instead of
/// [`Clone`]), use [`Vec::resize_with`].
/// If you only need to resize to a smaller size, use [`Vec::truncate`].
///
/// # Examples
///