Skip to content

Commit

Permalink
Rollup merge of rust-lang#66744 - chrisduerr:master, r=Dylan-DPC
Browse files Browse the repository at this point in the history
Fix shrink_to panic documentation

While the potential for panicking is already documented for the
`Vec::shrink_to` method, it is not clearly labeled with the usual
`# Panics` heading.

r? @steveklabnik
  • Loading branch information
tmandry committed Nov 27, 2019
2 parents 61b8105 + 73b467d commit a3a8ee0
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/liballoc/vec.rs
Original file line number Diff line number Diff line change
Expand Up @@ -629,6 +629,8 @@ impl<T> Vec<T> {
/// The capacity will remain at least as large as both the length
/// and the supplied value.
///
/// # Panics
///
/// Panics if the current capacity is smaller than the supplied
/// minimum capacity.
///
Expand Down

0 comments on commit a3a8ee0

Please sign in to comment.