Iterator::cycle() — document empty iterator special case

This commit is contained in:
Jonas Berlin 2021-12-13 13:23:33 +02:00 committed by GitHub
parent 6d6d0899c8
commit 7f2f9c60c2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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
///