Skip to content

Commit 0cb5076

Browse files
authored
Rollup merge of rust-lang#91859 - xkr47:patch-2, r=yaahc
Iterator::cycle() — document empty iterator special case
2 parents 49a339b + 715c562 commit 0cb5076

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

library/core/src/iter/traits/iterator.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3028,7 +3028,8 @@ pub trait Iterator {
30283028
///
30293029
/// Instead of stopping at [`None`], the iterator will instead start again,
30303030
/// from the beginning. After iterating again, it will start at the
3031-
/// beginning again. And again. And again. Forever.
3031+
/// beginning again. And again. And again. Forever. Note that in case the
3032+
/// original iterator is empty, the resulting iterator will also be empty.
30323033
///
30333034
/// # Examples
30343035
///

0 commit comments

Comments
 (0)