]> git.lizzy.rs Git - rust.git/commitdiff
Remove impossible panic note from `Vec::append`
authorTobias Bucher <tobiasbucher5991@gmail.com>
Tue, 22 Mar 2022 20:07:43 +0000 (21:07 +0100)
committerTobias Bucher <tobiasbucher5991@gmail.com>
Tue, 22 Mar 2022 20:07:43 +0000 (21:07 +0100)
Neither the number of elements in a vector can overflow a `usize`, nor
can the amount of elements in two vectors.

library/alloc/src/vec/mod.rs

index 5131168db0c82bb972889c2dc630fd5bf3405786..6c730ab3c8688303167da747c7374925e79a9ed9 100644 (file)
@@ -1767,7 +1767,7 @@ pub fn pop(&mut self) -> Option<T> {
     ///
     /// # Panics
     ///
-    /// Panics if the number of elements in the vector overflows a `usize`.
+    /// Panics if the new capacity exceeds `isize::MAX` bytes.
     ///
     /// # Examples
     ///