inline the implementation of TotalOrd for integers
This commit is contained in:
parent
afdd0b868a
commit
3550233d37
1 changed files with 1 additions and 0 deletions
|
|
@ -45,6 +45,7 @@ pub trait TotalOrd {
|
|||
pure fn cmp(&self, other: &Self) -> Ordering;
|
||||
}
|
||||
|
||||
#[inline(always)]
|
||||
pure fn icmp<T: Ord>(a: &T, b: &T) -> Ordering {
|
||||
if *a < *b { Less }
|
||||
else if *a > *b { Greater }
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue