diff options
| author | Christian Duerr <contact@christianduerr.com> | 2019-11-25 15:49:40 +0100 |
|---|---|---|
| committer | Christian Duerr <contact@christianduerr.com> | 2019-11-25 15:49:40 +0100 |
| commit | 73b467da8992617ba22c6a575b322ad1fd9aae31 (patch) | |
| tree | 16247ec14cc35f64f32916360640f3106961dc88 | |
| parent | 582a4eaee6b3674a34aeefaa5ecad0207bac9b4b (diff) | |
| download | rust-73b467da8992617ba22c6a575b322ad1fd9aae31.tar.gz rust-73b467da8992617ba22c6a575b322ad1fd9aae31.zip | |
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.
| -rw-r--r-- | src/liballoc/vec.rs | 2 |
1 files changed, 2 insertions, 0 deletions
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<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. /// |
