Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 4123d33

Browse files
committed
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.
1 parent 3ea4493 commit 4123d33

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

‎library/alloc/src/vec/mod.rs‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1767,7 +1767,7 @@ impl<T, A: Allocator> Vec<T, A> {
17671767
///
17681768
/// # Panics
17691769
///
1770-
/// Panics if the number of elements in the vector overflows a `usize`.
1770+
/// Panics if the new capacity exceeds `isize::MAX` bytes.
17711771
///
17721772
/// # Examples
17731773
///

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /