diff options
| author | Daniel Micay <danielmicay@gmail.com> | 2013-03-02 16:30:42 -0500 |
|---|---|---|
| committer | Daniel Micay <danielmicay@gmail.com> | 2013-03-02 16:30:42 -0500 |
| commit | 3550233d37c4acc5c438dbd2bab62869484b54a9 (patch) | |
| tree | cebcca304ec797f6c421e21621f287b1f732e14d | |
| parent | afdd0b868a4b94e828ccf7e1f68a2b0017943e2c (diff) | |
| download | rust-3550233d37c4acc5c438dbd2bab62869484b54a9.tar.gz rust-3550233d37c4acc5c438dbd2bab62869484b54a9.zip | |
inline the implementation of TotalOrd for integers
| -rw-r--r-- | src/libcore/cmp.rs | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/libcore/cmp.rs b/src/libcore/cmp.rs index d588f0c53b1..d00824f8be6 100644 --- a/src/libcore/cmp.rs +++ b/src/libcore/cmp.rs @@ -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 } |
