Merge pull request #2557 from bstrie/inlinerange

Inline `range` for all integral types
This commit is contained in:
Brian Anderson 2012-06-08 18:48:56 -07:00
commit 629f1b2e37

View file

@ -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;