From 7e7c2f19a3ab215fd4ef4ba983d52aeacf35d3c4 Mon Sep 17 00:00:00 2001 From: dylan_DPC Date: Fri, 27 Mar 2020 02:45:56 +0100 Subject: [PATCH] simplify test --- src/libcore/iter/traits/iterator.rs | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/libcore/iter/traits/iterator.rs b/src/libcore/iter/traits/iterator.rs index 853059f98a6..62492f639e4 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];