Skip to content

Commit

Permalink
Clarify short-circuiting behvaior of Iterator::zip.
Browse files Browse the repository at this point in the history
Fixes #52279.
  • Loading branch information
frewsxcv committed Jul 18, 2018
1 parent f686885 commit 2d4011d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/libcore/iter/iterator.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
///
Expand Down

0 comments on commit 2d4011d

Please sign in to comment.