Skip to content

Commit

Permalink
Use more optimal Ord implementation for integers
Browse files Browse the repository at this point in the history
  • Loading branch information
tesuji committed Aug 21, 2019
1 parent bea0372 commit 0337cc1
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/libcore/cmp.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 }
}
}
)*)
Expand Down

0 comments on commit 0337cc1

Please sign in to comment.