From 45f2926144d63600e8c0788c135ae3c4fcfa85e0 Mon Sep 17 00:00:00 2001 From: Brian Anderson Date: Fri, 8 Jun 2012 18:49:50 -0700 Subject: [PATCH] core: Inline unsigned range function --- src/libcore/uint-template.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/libcore/uint-template.rs b/src/libcore/uint-template.rs index 1a14ddc1d8f..8a79270361d 100644 --- a/src/libcore/uint-template.rs +++ b/src/libcore/uint-template.rs @@ -38,6 +38,7 @@ pure fn is_negative(x: T) -> bool { x < 0 as T } pure fn is_nonpositive(x: T) -> bool { x <= 0 as T } pure fn is_nonnegative(x: T) -> bool { x >= 0 as T } +#[inline(always)] #[doc = "Iterate over the range [`lo`..`hi`)"] fn range(lo: T, hi: T, it: fn(T) -> bool) { let mut i = lo;