core: Inline unsigned range function

This commit is contained in:
Brian Anderson 2012-06-08 18:49:50 -07:00
parent 629f1b2e37
commit 45f2926144

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;