Skip to content

Commit

Permalink
Document the field peek of IntersperseWith
Browse files Browse the repository at this point in the history
  • Loading branch information
Philippe-Cholet committed Nov 13, 2023
1 parent bc9738d commit 0dd980b
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/intersperse.rs
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,9 @@ where
{
element: ElemF,
iter: Fuse<I>,
/// `peek` is None while no item have been taken out of `iter` (at definition).
/// Then `peek` will alternatively be `Some(None)` and `Some(Some(item))`,
/// where `None` indicates it's time to generate from `element` (unless `iter` is empty).
peek: Option<Option<I::Item>>,
}

Expand Down

0 comments on commit 0dd980b

Please sign in to comment.