Fix Vec::reserve_exact documentation

The documentation previously said the new capacity cannot overflow `usize`, but in fact it cannot exceed `isize::MAX`.
This commit is contained in:
Dexter Chua 2021-12-08 20:00:19 -05:00 committed by GitHub
parent e6b883c74f
commit 42f91047c8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -822,7 +822,7 @@ impl<T, A: Allocator> Vec<T, A> {
///
/// # Panics
///
/// Panics if the new capacity overflows `usize`.
/// Panics if the new capacity exceeds `isize::MAX` bytes.
///
/// # Examples
///