Skip to content

Commit 73b467d

Browse files
committed
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.
1 parent 582a4ea commit 73b467d

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/liballoc/vec.rs

+2
Original file line numberDiff line numberDiff line change
@@ -629,6 +629,8 @@ impl<T> Vec<T> {
629629
/// The capacity will remain at least as large as both the length
630630
/// and the supplied value.
631631
///
632+
/// # Panics
633+
///
632634
/// Panics if the current capacity is smaller than the supplied
633635
/// minimum capacity.
634636
///

0 commit comments

Comments
 (0)