Use more optimal Ord implementation for integers
This commit is contained in:
parent
bea0372a1a
commit
0337cc117d
1 changed files with 3 additions and 3 deletions
|
|
@ -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 }
|
||||
}
|
||||
}
|
||||
)*)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue