Skip to content

Commit

Permalink
Add note to Vec::split_at_spare_mut docs that the method is low-level
Browse files Browse the repository at this point in the history
  • Loading branch information
WaffleLapkin committed Feb 3, 2021
1 parent 476a57a commit 76223fa
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions library/alloc/src/vec/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1837,6 +1837,21 @@ impl<T, A: Allocator> Vec<T, A> {
///
/// [`set_len`]: Vec::set_len
///
/// Note that this is a low-level API, which should be used with care for
/// optimization purposes. If you need to append data to a `Vec`
/// you can use [`push`], [`extend`], [`extend_from_slice`],
/// [`extend_from_within`], [`insert`], [`append`], [`resize`] or
/// [`resize_with`], depending on your exact needs.
///
/// [`push`]: Vec::push
/// [`extend`]: Vec::extend
/// [`extend_from_slice`]: Vec::extend_from_slice
/// [`extend_from_within`]: Vec::extend_from_within
/// [`insert`]: Vec::insert
/// [`append`]: Vec::append
/// [`resize`]: Vec::resize
/// [`resize_with`]: Vec::resize_with
///
/// # Examples
///
/// ```
Expand Down

0 comments on commit 76223fa

Please sign in to comment.