]> git.lizzy.rs Git - rust.git/commitdiff
follow the same function order in the trait
authorGuanqun Lu <guanqun.lu@gmail.com>
Tue, 26 Nov 2019 14:55:01 +0000 (22:55 +0800)
committerGuanqun Lu <guanqun.lu@gmail.com>
Tue, 26 Nov 2019 14:55:38 +0000 (22:55 +0800)
This removes several warnings in IDE.

src/libcore/cmp.rs

index eb5121dd0e0812cd7e5b77129a189b2e98c00129..eea3dc39d345ea3ea6aa8c35b5aad8e2b5cd747b 100644 (file)
@@ -464,9 +464,9 @@ fn lt(&self, other: &Self) -> bool { other.0 < self.0 }
     #[inline]
     fn le(&self, other: &Self) -> bool { other.0 <= self.0 }
     #[inline]
-    fn ge(&self, other: &Self) -> bool { other.0 >= self.0 }
-    #[inline]
     fn gt(&self, other: &Self) -> bool { other.0 > self.0 }
+    #[inline]
+    fn ge(&self, other: &Self) -> bool { other.0 >= self.0 }
 }
 
 #[stable(feature = "reverse_cmp_key", since = "1.19.0")]
@@ -1176,9 +1176,9 @@ fn lt(&self, other: & &B) -> bool { PartialOrd::lt(*self, *other) }
         #[inline]
         fn le(&self, other: & &B) -> bool { PartialOrd::le(*self, *other) }
         #[inline]
-        fn ge(&self, other: & &B) -> bool { PartialOrd::ge(*self, *other) }
-        #[inline]
         fn gt(&self, other: & &B) -> bool { PartialOrd::gt(*self, *other) }
+        #[inline]
+        fn ge(&self, other: & &B) -> bool { PartialOrd::ge(*self, *other) }
     }
     #[stable(feature = "rust1", since = "1.0.0")]
     impl<A: ?Sized> Ord for &A where A: Ord {
@@ -1208,9 +1208,9 @@ fn lt(&self, other: &&mut B) -> bool { PartialOrd::lt(*self, *other) }
         #[inline]
         fn le(&self, other: &&mut B) -> bool { PartialOrd::le(*self, *other) }
         #[inline]
-        fn ge(&self, other: &&mut B) -> bool { PartialOrd::ge(*self, *other) }
-        #[inline]
         fn gt(&self, other: &&mut B) -> bool { PartialOrd::gt(*self, *other) }
+        #[inline]
+        fn ge(&self, other: &&mut B) -> bool { PartialOrd::ge(*self, *other) }
     }
     #[stable(feature = "rust1", since = "1.0.0")]
     impl<A: ?Sized> Ord for &mut A where A: Ord {