diff options
| author | Niko Matsakis <niko@alum.mit.edu> | 2012-07-20 16:36:42 -0700 |
|---|---|---|
| committer | Niko Matsakis <niko@alum.mit.edu> | 2012-07-25 05:45:52 -0700 |
| commit | f061560ce44eccf322b7dbf41f36340c6ec1debd (patch) | |
| tree | 438199848cdbafab09ad6ebad8cf3fdd32331806 /src/libcore | |
| parent | 168306f11b323164ebe4050b9dea29b9756ade47 (diff) | |
| download | rust-f061560ce44eccf322b7dbf41f36340c6ec1debd.tar.gz rust-f061560ce44eccf322b7dbf41f36340c6ec1debd.zip | |
range() is pure
Diffstat (limited to 'src/libcore')
| -rw-r--r-- | src/libcore/uint-template.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libcore/uint-template.rs b/src/libcore/uint-template.rs index d3c042fb05d..75e17cd6a9b 100644 --- a/src/libcore/uint-template.rs +++ b/src/libcore/uint-template.rs @@ -39,7 +39,7 @@ pure fn is_nonnegative(x: T) -> bool { x >= 0 as T } #[inline(always)] /// 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; while i < hi { if !it(i) { break } |
