mirror of
https://github.com/rust-lang/rust.git
synced 2025-04-28 02:57:37 +00:00
Make uint::iterate pure
This commit is contained in:
parent
3cb147a71e
commit
6ac86e92fe
@ -71,7 +71,7 @@ pure fn hash(&&x: uint) -> uint { ret x; }
|
||||
* `true` If execution proceeded correctly, `false` if it was interrupted,
|
||||
* that is if `it` returned `false` at any point.
|
||||
*/
|
||||
fn iterate(lo: uint, hi: uint, it: fn(uint) -> bool) -> bool {
|
||||
pure fn iterate(lo: uint, hi: uint, it: fn(uint) -> bool) -> bool {
|
||||
let mut i = lo;
|
||||
while i < hi {
|
||||
if (!it(i)) { ret false; }
|
||||
|
Loading…
Reference in New Issue
Block a user