Skip to content

Commit

Permalink
Fix shrink_to panic documentation
Browse files Browse the repository at this point in the history
While the potential for panicking is already documented for the
`Vec::shrink_to` method, it is not clearly labeled with the usual
`# Panics` heading.
  • Loading branch information
chrisduerr committed Nov 25, 2019
1 parent 582a4ea commit 73b467d
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/liballoc/vec.rs
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 73b467d

Please sign in to comment.