Use more optimal Ord implementation for integers

This commit is contained in:
Lzu Tao 2019-08-21 00:37:17 +00:00
parent bea0372a1a
commit 0337cc117d

View file

@ -1012,9 +1012,9 @@ mod impls {
impl Ord for $t {
#[inline]
fn cmp(&self, other: &$t) -> Ordering {
if *self == *other { Equal }
else if *self < *other { Less }
else { Greater }
if *self < *other { Less }
else if *self > *other { Greater }
else { Equal }
}
}
)*)