diff options
| author | dylan_DPC <dylan.dpc@gmail.com> | 2020-03-27 02:45:56 +0100 |
|---|---|---|
| committer | dylan_DPC <dylan.dpc@gmail.com> | 2020-03-27 02:45:56 +0100 |
| commit | 7e7c2f19a3ab215fd4ef4ba983d52aeacf35d3c4 (patch) | |
| tree | 982607f184377fb46207998f3b1a18021e897362 | |
| parent | a9a2a319afbeb7e2a54f343a9360bd9bc4863b4f (diff) | |
| download | rust-7e7c2f19a3ab215fd4ef4ba983d52aeacf35d3c4.tar.gz rust-7e7c2f19a3ab215fd4ef4ba983d52aeacf35d3c4.zip | |
simplify test
| -rw-r--r-- | src/libcore/iter/traits/iterator.rs | 5 |
1 files changed, 1 insertions, 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]; |
