This repository was archived by the owner on May 28, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
library/core/src/iter/adapters Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -269,7 +269,7 @@ impl<I: Iterator> Peekable<I> {
269269 /// let mut iter = (0..5).peekable();
270270 /// // The first item of the iterator is 0; consume it.
271271 /// assert_eq!(iter.next_if(|&x| x == 0), Some(0));
272- /// // The next item returned is now 1, so `consume ` will return `false `.
272+ /// // The next item returned is now 1, so `next_if ` will return `None `.
273273 /// assert_eq!(iter.next_if(|&x| x == 0), None);
274274 /// // `next_if` saves the value of the next item if it was not equal to `expected`.
275275 /// assert_eq!(iter.next(), Some(1));
@@ -304,7 +304,7 @@ impl<I: Iterator> Peekable<I> {
304304 /// let mut iter = (0..5).peekable();
305305 /// // The first item of the iterator is 0; consume it.
306306 /// assert_eq!(iter.next_if_eq(&0), Some(0));
307- /// // The next item returned is now 1, so `consume ` will return `false `.
307+ /// // The next item returned is now 1, so `next_if ` will return `None `.
308308 /// assert_eq!(iter.next_if_eq(&0), None);
309309 /// // `next_if_eq` saves the value of the next item if it was not equal to `expected`.
310310 /// assert_eq!(iter.next(), Some(1));
You can’t perform that action at this time.
0 commit comments