simplify test
This commit is contained in:
parent
a9a2a319af
commit
7e7c2f19a3
1 changed files with 1 additions and 4 deletions
|
|
@ -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];
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue