]> git.lizzy.rs Git - rust.git/blobdiff - library/core/src/iter/traits/iterator.rs
Rollup merge of #94145 - ssomers:binary_heap_tests, r=jyn514
[rust.git] / library / core / src / iter / traits / iterator.rs
index 1cdee992137daebebe8cafa38c4786400d46e9fe..08abb0b0d924b5dadcdafaa4bc685a70b47abe46 100644 (file)
@@ -803,7 +803,7 @@ fn map<B, F>(self, f: F) -> Map<Self, F>
     /// (0..5).map(|x| x * 2 + 1)
     ///       .for_each(move |x| tx.send(x).unwrap());
     ///
-    /// let v: Vec<_> =  rx.iter().collect();
+    /// let v: Vec<_> = rx.iter().collect();
     /// assert_eq!(v, vec![1, 3, 5, 7, 9]);
     /// ```
     ///
@@ -2734,7 +2734,7 @@ fn check<T, B>(mut f: impl FnMut(T) -> Option<B>) -> impl FnMut((), T) -> Contro
     /// the first true result or the first error.
     ///
     /// The return type of this method depends on the return type of the closure.
-    /// If you return `Result<bool, E>` from the closure, you'll get a `Result<Option<Self::Item>; E>`.
+    /// If you return `Result<bool, E>` from the closure, you'll get a `Result<Option<Self::Item>, E>`.
     /// If you return `Option<bool>` from the closure, you'll get an `Option<Option<Self::Item>>`.
     ///
     /// # Examples