diff --git a/src/libcore/iter/traits/iterator.rs b/src/libcore/iter/traits/iterator.rs index 853059f98a60..62492f639e45 100644 --- a/src/libcore/iter/traits/iterator.rs +++ b/src/libcore/iter/traits/iterator.rs @@ -2023,10 +2023,7 @@ pub trait Iterator { /// I::Item: Ord, /// { /// iter.fold_first(|a, b| { - /// a.partial_cmp(b).map(move |cmp| match cmp { - /// Ordering::Greater | Ordering::Equal => a, - /// Ordering::Less => b, - /// }) + /// if a >= b { a } else { b } /// }) /// } /// let a = [10, 20, 5, -23, 0];