diff options
| author | Erick Tryzelaar <erick.tryzelaar@gmail.com> | 2012-12-11 09:06:56 -0800 |
|---|---|---|
| committer | Erick Tryzelaar <erick.tryzelaar@gmail.com> | 2012-12-17 22:01:38 -0800 |
| commit | 88962eeed86631b6646fce0602acd7daae7a1ddc (patch) | |
| tree | 3ab945c8056330d28b349830c6fdc5dd4ee42fb8 /src/libcore/uint-template.rs | |
| parent | 3fc74df7a423f5af0e951ab0b45faffca6bfa393 (diff) | |
core: Add &self to core::iter methods
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 da0c92021a4..1a9bca92d1f 100644 --- a/src/libcore/uint-template.rs +++ b/src/libcore/uint-template.rs @@ -92,8 +92,8 @@ 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 */ }`."] - pure fn times(it: fn() -> bool) { - let mut i = self; + pure fn times(&self, it: fn() -> bool) { + let mut i = *self; while i > 0 { if !it() { break } i -= 1; |
