diff options
| author | Tobias Bucher <tobiasbucher5991@gmail.com> | 2022-03-22 21:07:43 +0100 |
|---|---|---|
| committer | Tobias Bucher <tobiasbucher5991@gmail.com> | 2022-03-22 21:07:43 +0100 |
| commit | 4123d33fbd66fcf2f13e0fcb3543fd518ee98f42 (patch) | |
| tree | 3b691fbdc218e53df9dae254de2fb0af6b3c6c89 | |
| parent | 3ea44938e21f0de8ae7d4f6399a8a30f97867c70 (diff) | |
| download | rust-4123d33fbd66fcf2f13e0fcb3543fd518ee98f42.tar.gz rust-4123d33fbd66fcf2f13e0fcb3543fd518ee98f42.zip | |
Remove impossible panic note from `Vec::append`
Neither the number of elements in a vector can overflow a `usize`, nor can the amount of elements in two vectors.
| -rw-r--r-- | library/alloc/src/vec/mod.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/library/alloc/src/vec/mod.rs b/library/alloc/src/vec/mod.rs index 5131168db0c..6c730ab3c86 100644 --- a/library/alloc/src/vec/mod.rs +++ b/library/alloc/src/vec/mod.rs @@ -1767,7 +1767,7 @@ impl<T, A: Allocator> Vec<T, A> { /// /// # Panics /// - /// Panics if the number of elements in the vector overflows a `usize`. + /// Panics if the new capacity exceeds `isize::MAX` bytes. /// /// # Examples /// |
