From 7f2f9c60c27721dee52a3fce18911103416fb380 Mon Sep 17 00:00:00 2001 From: Jonas Berlin Date: Mon, 13 Dec 2021 13:23:33 +0200 Subject: [PATCH 1/2] =?UTF-8?q?Iterator::cycle()=20=E2=80=94=20document=20?= =?UTF-8?q?empty=20iterator=20special=20case?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- library/core/src/iter/traits/iterator.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/library/core/src/iter/traits/iterator.rs b/library/core/src/iter/traits/iterator.rs index 267fa40679836..6a38600c956fe 100644 --- a/library/core/src/iter/traits/iterator.rs +++ b/library/core/src/iter/traits/iterator.rs @@ -3028,7 +3028,8 @@ pub trait Iterator { /// /// Instead of stopping at [`None`], the iterator will instead start again, /// from the beginning. After iterating again, it will start at the - /// beginning again. And again. And again. Forever. + /// beginning again. And again. And again. Forever. Note that in case the + /// original iterator is empty the resulting iterator will also be empty. /// /// # Examples /// From 715c562d71f18ceb077482fc22339b3a73816b4e Mon Sep 17 00:00:00 2001 From: Jonas Berlin Date: Mon, 13 Dec 2021 13:52:17 +0200 Subject: [PATCH 2/2] [ReviewFix] Linguistics --- library/core/src/iter/traits/iterator.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library/core/src/iter/traits/iterator.rs b/library/core/src/iter/traits/iterator.rs index 6a38600c956fe..9a9a844f41bb4 100644 --- a/library/core/src/iter/traits/iterator.rs +++ b/library/core/src/iter/traits/iterator.rs @@ -3029,7 +3029,7 @@ pub trait Iterator { /// Instead of stopping at [`None`], the iterator will instead start again, /// from the beginning. After iterating again, it will start at the /// beginning again. And again. And again. Forever. Note that in case the - /// original iterator is empty the resulting iterator will also be empty. + /// original iterator is empty, the resulting iterator will also be empty. /// /// # Examples ///