Skip to content

Commit 3550233

Browse files
committed
inline the implementation of TotalOrd for integers
1 parent afdd0b8 commit 3550233

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/libcore/cmp.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ pub trait TotalOrd {
4545
pure fn cmp(&self, other: &Self) -> Ordering;
4646
}
4747

48+
#[inline(always)]
4849
pure fn icmp<T: Ord>(a: &T, b: &T) -> Ordering {
4950
if *a < *b { Less }
5051
else if *a > *b { Greater }

0 commit comments

Comments
 (0)