diff options
| author | Dylan DPC <dylan.dpc@gmail.com> | 2020-04-17 03:05:19 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-04-17 03:05:19 +0200 |
| commit | 28964b4ef2f165fdc667367bd9ba6b8d4cf81d34 (patch) | |
| tree | 42e3f3a3456786349d5ca1fbeff0a34221e2ad6a /src/libcore/iter | |
| parent | b2e4d4836f7890fc069d5c62086e1015b9d94ff2 (diff) | |
| parent | 2edd123a233fff2fbccd17299e0c14d2203e1acc (diff) | |
| download | rust-28964b4ef2f165fdc667367bd9ba6b8d4cf81d34.tar.gz rust-28964b4ef2f165fdc667367bd9ba6b8d4cf81d34.zip | |
Rollup merge of #71220 - cuviper:std_or_patterns, r=Mark-Simulacrum
Dogfood or_patterns in the standard library We can start using `or_patterns` in the standard library as a step toward stabilization. cc #54883 @Centril
Diffstat (limited to 'src/libcore/iter')
| -rw-r--r-- | src/libcore/iter/traits/iterator.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libcore/iter/traits/iterator.rs b/src/libcore/iter/traits/iterator.rs index c8829817e19..34ca79154b6 100644 --- a/src/libcore/iter/traits/iterator.rs +++ b/src/libcore/iter/traits/iterator.rs @@ -3109,7 +3109,7 @@ pub trait Iterator { Self::Item: PartialOrd<I::Item>, Self: Sized, { - matches!(self.partial_cmp(other), Some(Ordering::Less) | Some(Ordering::Equal)) + matches!(self.partial_cmp(other), Some(Ordering::Less | Ordering::Equal)) } /// Determines if the elements of this `Iterator` are lexicographically @@ -3149,7 +3149,7 @@ pub trait Iterator { Self::Item: PartialOrd<I::Item>, Self: Sized, { - matches!(self.partial_cmp(other), Some(Ordering::Greater) | Some(Ordering::Equal)) + matches!(self.partial_cmp(other), Some(Ordering::Greater | Ordering::Equal)) } /// Checks if the elements of this iterator are sorted. |
