Skip to content

Commit

Permalink
Rollup merge of rust-lang#96038 - beyarkay:patch-1, r=m-ou-se
Browse files Browse the repository at this point in the history
docs: add link from zip to unzip

The docs for `Iterator::unzip` explain that it is kind of an inverse operation to `Iterator::zip` and guide the reader to the `zip` docs, but the `zip` docs don't let the user know that they can undo the `zip` operation with `unzip`. This change modifies the docs to help the user find `unzip`.
  • Loading branch information
Dylan-DPC authored Apr 14, 2022
2 parents cfd37f2 + d73e328 commit 599af74
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions library/core/src/iter/traits/iterator.rs
Original file line number Diff line number Diff line change
Expand Up @@ -470,6 +470,10 @@ pub trait Iterator {
/// it will first try to advance the first iterator at most one time and if it still yielded an item
/// try to advance the second iterator at most one time.
///
/// To 'undo' the result of zipping up two iterators, see [`unzip`].
///
/// [`unzip`]: Iterator::unzip
///
/// # Examples
///
/// Basic usage:
Expand Down

0 comments on commit 599af74

Please sign in to comment.