From d1d5910a4c36ab6f0b9940ea4e1e8dea3b4df38a Mon Sep 17 00:00:00 2001 From: tk <49250442+tkr-sh@users.noreply.github.com> Date: Wed, 14 May 2025 00:54:47 +0200 Subject: [PATCH 1/3] =?UTF-8?q?=F0=9F=93=9D=20docs:=20improve=20doc=20of?= =?UTF-8?q?=20some=20methods=20w/=20ranges?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- library/alloc/src/collections/vec_deque/mod.rs | 12 ++++++------ library/alloc/src/string.rs | 12 ++++++------ library/alloc/src/vec/mod.rs | 8 ++++---- 3 files changed, 16 insertions(+), 16 deletions(-) diff --git a/library/alloc/src/collections/vec_deque/mod.rs b/library/alloc/src/collections/vec_deque/mod.rs index 712f38a76c018..b059ab57ba873 100644 --- a/library/alloc/src/collections/vec_deque/mod.rs +++ b/library/alloc/src/collections/vec_deque/mod.rs @@ -1458,8 +1458,8 @@ impl VecDeque { /// /// # Panics /// - /// Panics if the starting point is greater than the end point or if - /// the end point is greater than the length of the deque. + /// Panics if the range has `start_bound > end_bound`, or, one of the range + /// bound is bounded and greater than the length of the deque. /// /// # Examples /// @@ -1494,8 +1494,8 @@ impl VecDeque { /// /// # Panics /// - /// Panics if the starting point is greater than the end point or if - /// the end point is greater than the length of the deque. + /// Panics if the range has `start_bound > end_bound`, or, one of the range + /// bound is bounded and greater than the length of the deque. /// /// # Examples /// @@ -1540,8 +1540,8 @@ impl VecDeque { /// /// # Panics /// - /// Panics if the starting point is greater than the end point or if - /// the end point is greater than the length of the deque. + /// Panics if the range has `start_bound > end_bound`, or, one of the range + /// bound is bounded and greater than the length of the deque. /// /// # Leaking /// diff --git a/library/alloc/src/string.rs b/library/alloc/src/string.rs index 4e42a5da7eacb..0c48e871ea0e7 100644 --- a/library/alloc/src/string.rs +++ b/library/alloc/src/string.rs @@ -1116,8 +1116,8 @@ impl String { /// /// # Panics /// - /// Panics if the starting point or end point do not lie on a [`char`] - /// boundary, or if they're out of bounds. + /// Panics if the range has `start_bound > end_bound`, or, one of the range + /// bound is bounded and does not lie on a [`char`] boundary. /// /// # Examples /// @@ -1920,8 +1920,8 @@ impl String { /// /// # Panics /// - /// Panics if the starting point or end point do not lie on a [`char`] - /// boundary, or if they're out of bounds. + /// Panics if the range has `start_bound > end_bound`, or, one of the range + /// bound is bounded and does not lie on a [`char`] boundary. /// /// # Leaking /// @@ -2030,8 +2030,8 @@ impl String { /// /// # Panics /// - /// Panics if the starting point or end point do not lie on a [`char`] - /// boundary, or if they're out of bounds. + /// Panics if the range has `start_bound > end_bound`, or, one of the range + /// bound is bounded and does not lie on a [`char`] boundary. /// /// # Examples /// diff --git a/library/alloc/src/vec/mod.rs b/library/alloc/src/vec/mod.rs index a97912304c894..eb55ba64fcae5 100644 --- a/library/alloc/src/vec/mod.rs +++ b/library/alloc/src/vec/mod.rs @@ -2606,8 +2606,8 @@ impl Vec { /// /// # Panics /// - /// Panics if the starting point is greater than the end point or if - /// the end point is greater than the length of the vector. + /// Panics if the range has `start_bound > end_bound`, or, one of the range + /// bound is bounded and greater than the length of the vector. /// /// # Leaking /// @@ -3615,8 +3615,8 @@ impl Vec { /// /// # Panics /// - /// Panics if the starting point is greater than the end point or if - /// the end point is greater than the length of the vector. + /// Panics if the range has `start_bound > end_bound`, or, one of the range + /// bound is bounded and greater than the length of the vector. /// /// # Examples /// From 77c1291c5b2a96023a72bd312c22703c91ec1c82 Mon Sep 17 00:00:00 2001 From: tk <49250442+tkr-sh@users.noreply.github.com> Date: Sat, 17 May 2025 09:05:25 +0000 Subject: [PATCH 2/3] =?UTF-8?q?=E2=9C=8F=EF=B8=8F=20fix:=20one=20of=20the?= =?UTF-8?q?=20range=20"s/bound/bounds"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- library/alloc/src/collections/vec_deque/mod.rs | 6 +++--- library/alloc/src/string.rs | 6 +++--- library/alloc/src/vec/mod.rs | 4 ++-- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/library/alloc/src/collections/vec_deque/mod.rs b/library/alloc/src/collections/vec_deque/mod.rs index b059ab57ba873..8826a197ae079 100644 --- a/library/alloc/src/collections/vec_deque/mod.rs +++ b/library/alloc/src/collections/vec_deque/mod.rs @@ -1459,7 +1459,7 @@ impl VecDeque { /// # Panics /// /// Panics if the range has `start_bound > end_bound`, or, one of the range - /// bound is bounded and greater than the length of the deque. + /// bounds is bounded and greater than the length of the deque. /// /// # Examples /// @@ -1495,7 +1495,7 @@ impl VecDeque { /// # Panics /// /// Panics if the range has `start_bound > end_bound`, or, one of the range - /// bound is bounded and greater than the length of the deque. + /// bounds is bounded and greater than the length of the deque. /// /// # Examples /// @@ -1541,7 +1541,7 @@ impl VecDeque { /// # Panics /// /// Panics if the range has `start_bound > end_bound`, or, one of the range - /// bound is bounded and greater than the length of the deque. + /// bounds is bounded and greater than the length of the deque. /// /// # Leaking /// diff --git a/library/alloc/src/string.rs b/library/alloc/src/string.rs index 0c48e871ea0e7..73056fe43ca6b 100644 --- a/library/alloc/src/string.rs +++ b/library/alloc/src/string.rs @@ -1117,7 +1117,7 @@ impl String { /// # Panics /// /// Panics if the range has `start_bound > end_bound`, or, one of the range - /// bound is bounded and does not lie on a [`char`] boundary. + /// bounds is bounded and does not lie on a [`char`] boundary. /// /// # Examples /// @@ -1921,7 +1921,7 @@ impl String { /// # Panics /// /// Panics if the range has `start_bound > end_bound`, or, one of the range - /// bound is bounded and does not lie on a [`char`] boundary. + /// bounds is bounded and does not lie on a [`char`] boundary. /// /// # Leaking /// @@ -2031,7 +2031,7 @@ impl String { /// # Panics /// /// Panics if the range has `start_bound > end_bound`, or, one of the range - /// bound is bounded and does not lie on a [`char`] boundary. + /// bounds is bounded and does not lie on a [`char`] boundary. /// /// # Examples /// diff --git a/library/alloc/src/vec/mod.rs b/library/alloc/src/vec/mod.rs index eb55ba64fcae5..0b57ded4bce2c 100644 --- a/library/alloc/src/vec/mod.rs +++ b/library/alloc/src/vec/mod.rs @@ -2607,7 +2607,7 @@ impl Vec { /// # Panics /// /// Panics if the range has `start_bound > end_bound`, or, one of the range - /// bound is bounded and greater than the length of the vector. + /// bounds is bounded and greater than the length of the vector. /// /// # Leaking /// @@ -3616,7 +3616,7 @@ impl Vec { /// # Panics /// /// Panics if the range has `start_bound > end_bound`, or, one of the range - /// bound is bounded and greater than the length of the vector. + /// bounds is bounded and greater than the length of the vector. /// /// # Examples /// From 375f6fe8aab384f3c43ada94988773b3b765c79f Mon Sep 17 00:00:00 2001 From: tk <49250442+tkr-sh@users.noreply.github.com> Date: Sat, 17 May 2025 19:24:44 +0000 Subject: [PATCH 3/3] =?UTF-8?q?=F0=9F=9A=9A=20refactor:=20rename=20from=20?= =?UTF-8?q?"one=20of=20the"=20to=20"a"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- library/alloc/src/collections/vec_deque/mod.rs | 12 ++++++------ library/alloc/src/string.rs | 12 ++++++------ library/alloc/src/vec/mod.rs | 8 ++++---- 3 files changed, 16 insertions(+), 16 deletions(-) diff --git a/library/alloc/src/collections/vec_deque/mod.rs b/library/alloc/src/collections/vec_deque/mod.rs index 8826a197ae079..939f827014aaf 100644 --- a/library/alloc/src/collections/vec_deque/mod.rs +++ b/library/alloc/src/collections/vec_deque/mod.rs @@ -1458,8 +1458,8 @@ impl VecDeque { /// /// # Panics /// - /// Panics if the range has `start_bound > end_bound`, or, one of the range - /// bounds is bounded and greater than the length of the deque. + /// Panics if the range has `start_bound > end_bound`, or, a range bound is + /// bounded and greater than the length of the deque. /// /// # Examples /// @@ -1494,8 +1494,8 @@ impl VecDeque { /// /// # Panics /// - /// Panics if the range has `start_bound > end_bound`, or, one of the range - /// bounds is bounded and greater than the length of the deque. + /// Panics if the range has `start_bound > end_bound`, or, a range bound is + /// bounded and greater than the length of the deque. /// /// # Examples /// @@ -1540,8 +1540,8 @@ impl VecDeque { /// /// # Panics /// - /// Panics if the range has `start_bound > end_bound`, or, one of the range - /// bounds is bounded and greater than the length of the deque. + /// Panics if the range has `start_bound > end_bound`, or, a range bound is + /// bounded and greater than the length of the deque. /// /// # Leaking /// diff --git a/library/alloc/src/string.rs b/library/alloc/src/string.rs index 73056fe43ca6b..d6c8646d01145 100644 --- a/library/alloc/src/string.rs +++ b/library/alloc/src/string.rs @@ -1116,8 +1116,8 @@ impl String { /// /// # Panics /// - /// Panics if the range has `start_bound > end_bound`, or, one of the range - /// bounds is bounded and does not lie on a [`char`] boundary. + /// Panics if the range has `start_bound > end_bound`, or, a range bound is + /// bounded and does not lie on a [`char`] boundary. /// /// # Examples /// @@ -1920,8 +1920,8 @@ impl String { /// /// # Panics /// - /// Panics if the range has `start_bound > end_bound`, or, one of the range - /// bounds is bounded and does not lie on a [`char`] boundary. + /// Panics if the range has `start_bound > end_bound`, or, a range bound is + /// bounded and does not lie on a [`char`] boundary. /// /// # Leaking /// @@ -2030,8 +2030,8 @@ impl String { /// /// # Panics /// - /// Panics if the range has `start_bound > end_bound`, or, one of the range - /// bounds is bounded and does not lie on a [`char`] boundary. + /// Panics if the range has `start_bound > end_bound`, or, a range bound is + /// bounded and does not lie on a [`char`] boundary. /// /// # Examples /// diff --git a/library/alloc/src/vec/mod.rs b/library/alloc/src/vec/mod.rs index 0b57ded4bce2c..c56f4e22dde7e 100644 --- a/library/alloc/src/vec/mod.rs +++ b/library/alloc/src/vec/mod.rs @@ -2606,8 +2606,8 @@ impl Vec { /// /// # Panics /// - /// Panics if the range has `start_bound > end_bound`, or, one of the range - /// bounds is bounded and greater than the length of the vector. + /// Panics if the range has `start_bound > end_bound`, or, a range bound is + /// bounded and greater than the length of the vector. /// /// # Leaking /// @@ -3615,8 +3615,8 @@ impl Vec { /// /// # Panics /// - /// Panics if the range has `start_bound > end_bound`, or, one of the range - /// bounds is bounded and greater than the length of the vector. + /// Panics if the range has `start_bound > end_bound`, or, a range bound is + /// bounded and greater than the length of the vector. /// /// # Examples ///