Rollup merge of #52477 - frewsxcv:frewsxcv-iter-short, r=alexcrichton

Clarify short-circuiting behvaior of Iterator::zip.

Fixes https://github.com/rust-lang/rust/issues/52279.
This commit is contained in:
kennytm 2018-07-18 22:35:04 +08:00 committed by GitHub
commit 091c9d2eed
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -384,7 +384,9 @@ pub trait Iterator {
///
/// In other words, it zips two iterators together, into a single one.
///
/// If either iterator returns [`None`], [`next`] will return [`None`].
/// If either iterator returns [`None`], [`next`] from the zipped iterator
/// will return [`None`]. If the first iterator returns [`None`], `zip` will
/// short-circuit and `next` will not be called on the second iterator.
///
/// # Examples
///