Skip to content

Commit f32d583

Browse files
committed
docs: improve doc of some methods w/ ranges
1 parent 8712e45 commit f32d583

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
@@ -2746,8 +2746,8 @@ impl<T, A: Allocator> Vec<T, A> {
27462746
///
27472747
/// # Panics
27482748
///
2749-
/// Panics if the starting point is greater than the end point or if
2750-
/// the end point is greater than the length of the vector.
2749+
/// Panics if the range has `start_bound > end_bound`, or, if the range is
2750+
/// bounded on either end and past the length of the vector.
27512751
///
27522752
/// # Leaking
27532753
///
@@ -3810,8 +3810,8 @@ impl<T, A: Allocator> Vec<T, A> {
38103810
///
38113811
/// # Panics
38123812
///
3813-
/// Panics if the starting point is greater than the end point or if
3814-
/// the end point is greater than the length of the vector.
3813+
/// Panics if the range has `start_bound > end_bound`, or, if the range is
3814+
/// bounded on either end and past the length of the vector.
38153815
///
38163816
/// # Examples
38173817
///

0 commit comments

Comments
 (0)