Skip to content

Commit

Permalink
Fix Vec::reserve_exact documentation
Browse files Browse the repository at this point in the history
The documentation previously said the new capacity cannot overflow `usize`, but in fact it cannot exceed `isize::MAX`.
  • Loading branch information
dalcde authored Dec 9, 2021
1 parent e6b883c commit 42f9104
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion library/alloc/src/vec/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
///
Expand Down

0 comments on commit 42f9104

Please sign in to comment.