range() is pure
This commit is contained in:
parent
168306f11b
commit
f061560ce4
1 changed files with 1 additions and 1 deletions
|
@ -39,7 +39,7 @@ pure fn is_nonnegative(x: T) -> bool { x >= 0 as T }
|
||||||
|
|
||||||
#[inline(always)]
|
#[inline(always)]
|
||||||
/// Iterate over the range [`lo`..`hi`)
|
/// Iterate over the range [`lo`..`hi`)
|
||||||
fn range(lo: T, hi: T, it: fn(T) -> bool) {
|
pure fn range(lo: T, hi: T, it: fn(T) -> bool) {
|
||||||
let mut i = lo;
|
let mut i = lo;
|
||||||
while i < hi {
|
while i < hi {
|
||||||
if !it(i) { break }
|
if !it(i) { break }
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue