Skip to content

Commit

Permalink
docs: add link from zip to unzip
Browse files Browse the repository at this point in the history
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
beyarkay authored Apr 14, 2022
1 parent f387c93 commit f6d9577
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 @@ -469,6 +469,10 @@ pub trait Iterator {
/// If the zipped iterator has no more elements to return then each further attempt to advance
/// 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
///
Expand Down

0 comments on commit f6d9577

Please sign in to comment.