-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Closed
Labels
A-docsArea: Documentation for any part of the project, including the compiler, standard library, and toolsArea: Documentation for any part of the project, including the compiler, standard library, and tools
Description
Lines 716 to 718 in f0e5c95
/// # Panics | |
/// | |
/// Panics if `index` is out of bounds. |
In fact, as the second example shows, index == len
is allowed. The phrase "out of bounds" is used in the docs of other methods (remove
and swap_remove
) to mean 0 <= index < len
so it should not be used to mean 0 <= index <= len
here.
Suggest changing the wording to match Vec::split_off
:
Panics if
index
>len
.
scottmcm and srinivasreddy
Metadata
Metadata
Assignees
Labels
A-docsArea: Documentation for any part of the project, including the compiler, standard library, and toolsArea: Documentation for any part of the project, including the compiler, standard library, and tools