From 3550233d37c4acc5c438dbd2bab62869484b54a9 Mon Sep 17 00:00:00 2001 From: Daniel Micay Date: Sat, 2 Mar 2013 16:30:42 -0500 Subject: [PATCH] inline the implementation of TotalOrd for integers --- src/libcore/cmp.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/libcore/cmp.rs b/src/libcore/cmp.rs index d588f0c53b17..d00824f8be65 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(a: &T, b: &T) -> Ordering { if *a < *b { Less } else if *a > *b { Greater }