Skip to content

Commit ac3c480

Browse files
committed
docs: improve doc of some methods w/ ranges
1 parent e4b5219 commit ac3c480

File tree

3 files changed

+16
-16
lines changed

3 files changed

+16
-16
lines changed

library/alloc/src/collections/vec_deque/mod.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1486,8 +1486,8 @@ impl<T, A: Allocator> VecDeque<T, A> {
14861486
///
14871487
/// # Panics
14881488
///
1489-
/// Panics if the starting point is greater than the end point or if
1490-
/// the end point is greater than the length of the deque.
1489+
/// Panics if the range has `start_bound > end_bound`, or, if the range is
1490+
/// bounded on either end and past the length of the deque.
14911491
///
14921492
/// # Examples
14931493
///
@@ -1522,8 +1522,8 @@ impl<T, A: Allocator> VecDeque<T, A> {
15221522
///
15231523
/// # Panics
15241524
///
1525-
/// Panics if the starting point is greater than the end point or if
1526-
/// the end point is greater than the length of the deque.
1525+
/// Panics if the range has `start_bound > end_bound`, or, if the range is
1526+
/// bounded on either end and past the length of the deque.
15271527
///
15281528
/// # Examples
15291529
///
@@ -1568,8 +1568,8 @@ impl<T, A: Allocator> VecDeque<T, A> {
15681568
///
15691569
/// # Panics
15701570
///
1571-
/// Panics if the starting point is greater than the end point or if
1572-
/// the end point is greater than the length of the deque.
1571+
/// Panics if the range has `start_bound > end_bound`, or, if the range is
1572+
/// bounded on either end and past the length of the deque.
15731573
///
15741574
/// # Leaking
15751575
///

library/alloc/src/string.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1117,8 +1117,8 @@ impl String {
11171117
///
11181118
/// # Panics
11191119
///
1120-
/// Panics if the starting point or end point do not lie on a [`char`]
1121-
/// boundary, or if they're out of bounds.
1120+
/// Panics if the range has `start_bound > end_bound`, or, if the range is
1121+
/// bounded on either end and does not lie on a [`char`] boundary.
11221122
///
11231123
/// # Examples
11241124
///
@@ -1939,8 +1939,8 @@ impl String {
19391939
///
19401940
/// # Panics
19411941
///
1942-
/// Panics if the starting point or end point do not lie on a [`char`]
1943-
/// boundary, or if they're out of bounds.
1942+
/// Panics if the range has `start_bound > end_bound`, or, if the range is
1943+
/// bounded on either end and does not lie on a [`char`] boundary.
19441944
///
19451945
/// # Leaking
19461946
///
@@ -2050,8 +2050,8 @@ impl String {
20502050
///
20512051
/// # Panics
20522052
///
2053-
/// Panics if the starting point or end point do not lie on a [`char`]
2054-
/// boundary, or if they're out of bounds.
2053+
/// Panics if the range has `start_bound > end_bound`, or, if the range is
2054+
/// bounded on either end and does not lie on a [`char`] boundary.
20552055
///
20562056
/// # Examples
20572057
///

library/alloc/src/vec/mod.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2796,8 +2796,8 @@ impl<T, A: Allocator> Vec<T, A> {
27962796
///
27972797
/// # Panics
27982798
///
2799-
/// Panics if the starting point is greater than the end point or if
2800-
/// the end point is greater than the length of the vector.
2799+
/// Panics if the range has `start_bound > end_bound`, or, if the range is
2800+
/// bounded on either end and past the length of the vector.
28012801
///
28022802
/// # Leaking
28032803
///
@@ -3860,8 +3860,8 @@ impl<T, A: Allocator> Vec<T, A> {
38603860
///
38613861
/// # Panics
38623862
///
3863-
/// Panics if the starting point is greater than the end point or if
3864-
/// the end point is greater than the length of the vector.
3863+
/// Panics if the range has `start_bound > end_bound`, or, if the range is
3864+
/// bounded on either end and past the length of the vector.
38653865
///
38663866
/// # Examples
38673867
///

0 commit comments

Comments
 (0)