From 73b467da8992617ba22c6a575b322ad1fd9aae31 Mon Sep 17 00:00:00 2001 From: Christian Duerr Date: Mon, 25 Nov 2019 15:49:40 +0100 Subject: [PATCH] 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. --- src/liballoc/vec.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/liballoc/vec.rs b/src/liballoc/vec.rs index 07e4358d644c6..da31ed178f441 100644 --- a/src/liballoc/vec.rs +++ b/src/liballoc/vec.rs @@ -629,6 +629,8 @@ impl Vec { /// 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. ///