@@ -1369,7 +1369,7 @@ pub trait PartialOrd<Rhs: ?Sized = Self>: PartialEq<Rhs> {
13691369 #[ stable( feature = "rust1" , since = "1.0.0" ) ]
13701370 #[ rustc_diagnostic_item = "cmp_partialord_lt" ]
13711371 fn lt ( & self , other : & Rhs ) -> bool {
1372- matches ! ( self . partial_cmp( other) , Some ( Less ) )
1372+ self . partial_cmp ( other) . is_some_and ( Ordering :: is_lt )
13731373 }
13741374
13751375 /// Tests less than or equal to (for `self` and `other`) and is used by the
@@ -1387,7 +1387,7 @@ pub trait PartialOrd<Rhs: ?Sized = Self>: PartialEq<Rhs> {
13871387 #[ stable( feature = "rust1" , since = "1.0.0" ) ]
13881388 #[ rustc_diagnostic_item = "cmp_partialord_le" ]
13891389 fn le ( & self , other : & Rhs ) -> bool {
1390- matches ! ( self . partial_cmp( other) , Some ( Less | Equal ) )
1390+ self . partial_cmp ( other) . is_some_and ( Ordering :: is_le )
13911391 }
13921392
13931393 /// Tests greater than (for `self` and `other`) and is used by the `>`
@@ -1405,7 +1405,7 @@ pub trait PartialOrd<Rhs: ?Sized = Self>: PartialEq<Rhs> {
14051405 #[ stable( feature = "rust1" , since = "1.0.0" ) ]
14061406 #[ rustc_diagnostic_item = "cmp_partialord_gt" ]
14071407 fn gt ( & self , other : & Rhs ) -> bool {
1408- matches ! ( self . partial_cmp( other) , Some ( Greater ) )
1408+ self . partial_cmp ( other) . is_some_and ( Ordering :: is_gt )
14091409 }
14101410
14111411 /// Tests greater than or equal to (for `self` and `other`) and is used by
@@ -1423,7 +1423,7 @@ pub trait PartialOrd<Rhs: ?Sized = Self>: PartialEq<Rhs> {
14231423 #[ stable( feature = "rust1" , since = "1.0.0" ) ]
14241424 #[ rustc_diagnostic_item = "cmp_partialord_ge" ]
14251425 fn ge ( & self , other : & Rhs ) -> bool {
1426- matches ! ( self . partial_cmp( other) , Some ( Greater | Equal ) )
1426+ self . partial_cmp ( other) . is_some_and ( Ordering :: is_ge )
14271427 }
14281428}
14291429
0 commit comments