From f061560ce44eccf322b7dbf41f36340c6ec1debd Mon Sep 17 00:00:00 2001 From: Niko Matsakis Date: Fri, 20 Jul 2012 16:36:42 -0700 Subject: [PATCH] range() is pure --- src/libcore/uint-template.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 }