We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 1117375 + 08b4b54 commit cfb6619Copy full SHA for cfb6619
src/libcore/iter/traits/iterator.rs
@@ -746,23 +746,21 @@ pub trait Iterator {
746
/// Basic usage:
747
///
748
/// ```
749
- /// let a = ["1", "lol", "3", "NaN", "5"];
+ /// let a = ["1", "two", "NaN", "four", "5"];
750
751
/// let mut iter = a.iter().filter_map(|s| s.parse().ok());
752
753
/// assert_eq!(iter.next(), Some(1));
754
- /// assert_eq!(iter.next(), Some(3));
755
/// assert_eq!(iter.next(), Some(5));
756
/// assert_eq!(iter.next(), None);
757
758
759
/// Here's the same example, but with [`filter`] and [`map`]:
760
761
762
763
/// let mut iter = a.iter().map(|s| s.parse()).filter(|s| s.is_ok()).map(|s| s.unwrap());
764
765
766
767
768
0 commit comments