diff options
| author | Michael Sullivan <sully@msully.net> | 2012-08-23 10:22:14 -0700 |
|---|---|---|
| committer | Michael Sullivan <sully@msully.net> | 2012-08-23 10:22:33 -0700 |
| commit | 226fd87199fb0184fb39ffc5dff3865cfdc9f362 (patch) | |
| tree | df254c129decd2b0487f6a768e12cfec72f09984 /src/libcore/uint-template.rs | |
| parent | 0f0a9775bae31169153d36dfa586e899c90921d5 (diff) | |
Make a bunch more of the iteration functions/methods marked pure. Closes #3253.
Diffstat (limited to 'src/libcore/uint-template.rs')
| -rw-r--r-- | src/libcore/uint-template.rs | 4 |
1 files changed, 2 insertions, 2 deletions
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 { |
