From 226fd87199fb0184fb39ffc5dff3865cfdc9f362 Mon Sep 17 00:00:00 2001 From: Michael Sullivan Date: Thu, 23 Aug 2012 10:22:14 -0700 Subject: Make a bunch more of the iteration functions/methods marked pure. Closes #3253. --- src/libcore/uint-template.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/libcore/uint-template.rs') diff --git a/src/libcore/uint-template.rs b/src/libcore/uint-template.rs index 8e2cdf65c4a..95e4edbba5c 100644 --- a/src/libcore/uint-template.rs +++ b/src/libcore/uint-template.rs @@ -87,7 +87,7 @@ impl T: iter::Times { will execute the given function exactly x times. If we assume that \ `x` is an int, this is functionally equivalent to \ `for int::range(0, x) |_i| { /* anything */ }`."] - fn times(it: fn() -> bool) { + pure fn times(it: fn() -> bool) { let mut i = self; while i > 0 { if !it() { break } @@ -99,7 +99,7 @@ impl T: iter::Times { impl T: iter::TimesIx { #[inline(always)] /// Like `times`, but with an index, `eachi`-style. - fn timesi(it: fn(uint) -> bool) { + pure fn timesi(it: fn(uint) -> bool) { let slf = self as uint; let mut i = 0u; while i < slf { -- cgit 1.4.1-3-g733a5