提交 9ae413c3 编写于 作者: C Corey Farwell 提交者: GitHub

Rollup merge of #41528 - steveklabnik:gh33269, r=frewsxcv

Clarify "side effect" in peek's docs

Fixes #33269

/cc @tshepang
......@@ -629,8 +629,9 @@ fn enumerate(self) -> Enumerate<Self> where Self: Sized {
///
/// Note that the underlying iterator is still advanced when [`peek`] is
/// called for the first time: In order to retrieve the next element,
/// [`next`] is called on the underlying iterator, hence any side effects of
/// the [`next`] method will occur.
/// [`next`] is called on the underlying iterator, hence any side effects (i.e.
/// anything other than fetching the next value) of the [`next`] method
/// will occur.
///
/// [`peek`]: struct.Peekable.html#method.peek
/// [`next`]: ../../std/iter/trait.Iterator.html#tymethod.next
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册