mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-23 15:23:46 +00:00
simplify test
This commit is contained in:
parent
a9a2a319af
commit
7e7c2f19a3
@ -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…
Reference in New Issue
Block a user