From 73b467da8992617ba22c6a575b322ad1fd9aae31 Mon Sep 17 00:00:00 2001 From: Christian Duerr Date: Mon, 25 Nov 2019 15:49:40 +0100 Subject: 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(+) (limited to 'src/liballoc') diff --git a/src/liballoc/vec.rs b/src/liballoc/vec.rs index 07e4358d644..da31ed178f4 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. /// -- cgit 1.4.1-3-g733a5