Skip to content

Commit 7e7c2f1

Browse files
committed
simplify test
1 parent a9a2a31 commit 7e7c2f1

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

src/libcore/iter/traits/iterator.rs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2023,10 +2023,7 @@ pub trait Iterator {
20232023
/// I::Item: Ord,
20242024
/// {
20252025
/// iter.fold_first(|a, b| {
2026-
/// a.partial_cmp(b).map(move |cmp| match cmp {
2027-
/// Ordering::Greater | Ordering::Equal => a,
2028-
/// Ordering::Less => b,
2029-
/// })
2026+
/// if a >= b { a } else { b }
20302027
/// })
20312028
/// }
20322029
/// let a = [10, 20, 5, -23, 0];

0 commit comments

Comments
 (0)