Skip to content

Commit 42f9104

Browse files
authored
Fix Vec::reserve_exact documentation
The documentation previously said the new capacity cannot overflow `usize`, but in fact it cannot exceed `isize::MAX`.
1 parent e6b883c commit 42f9104

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

library/alloc/src/vec/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -822,7 +822,7 @@ impl<T, A: Allocator> Vec<T, A> {
822822
///
823823
/// # Panics
824824
///
825-
/// Panics if the new capacity overflows `usize`.
825+
/// Panics if the new capacity exceeds `isize::MAX` bytes.
826826
///
827827
/// # Examples
828828
///

0 commit comments

Comments
 (0)