about summary refs log tree commit diff
path: root/src/libcore/iter
diff options
context:
space:
mode:
authorDylan DPC <dylan.dpc@gmail.com>2020-04-17 03:05:19 +0200
committerGitHub <noreply@github.com>2020-04-17 03:05:19 +0200
commit28964b4ef2f165fdc667367bd9ba6b8d4cf81d34 (patch)
tree42e3f3a3456786349d5ca1fbeff0a34221e2ad6a /src/libcore/iter
parentb2e4d4836f7890fc069d5c62086e1015b9d94ff2 (diff)
parent2edd123a233fff2fbccd17299e0c14d2203e1acc (diff)
downloadrust-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.rs4
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.