1
Fork 0

Rollup merge of #91859 - xkr47:patch-2, r=yaahc

Iterator::cycle() — document empty iterator special case
This commit is contained in:
Matthias Krüger 2021-12-15 01:28:05 +01:00 committed by GitHub
commit d6c802ee7a
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, /// Instead of stopping at [`None`], the iterator will instead start again,
/// from the beginning. After iterating again, it will start at the /// 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 /// # Examples
/// ///