mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-22 14:55:26 +00:00
core: Inline unsigned range function
This commit is contained in:
parent
629f1b2e37
commit
45f2926144
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user