Skip to content

Commit 7f2f9c6

Browse files
authored
Iterator::cycle() — document empty iterator special case
1 parent 6d6d089 commit 7f2f9c6

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

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

+2-1
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)