We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 6778396 commit 075b269Copy full SHA for 075b269
src/libcore/iter/traits/iterator.rs
@@ -2451,10 +2451,7 @@ pub trait Iterator {
2451
Self::Item: PartialOrd<I::Item>,
2452
Self: Sized,
2453
{
2454
- match self.partial_cmp(other) {
2455
- Some(Ordering::Less) => true,
2456
- _ => false,
2457
- }
+ self.partial_cmp(other) == Some(Ordering::Less)
2458
}
2459
2460
/// Determines if the elements of this `Iterator` are lexicographically
@@ -2479,10 +2476,7 @@ pub trait Iterator {
2479
2476
2480
2477
2481
2478
2482
2483
- Some(Ordering::Greater) => true,
2484
2485
+ self.partial_cmp(other) == Some(Ordering::Greater)
2486
2487
2488
0 commit comments