diff options
| author | Brian Anderson <banderson@mozilla.com> | 2012-09-26 16:27:12 -0700 |
|---|---|---|
| committer | Brian Anderson <banderson@mozilla.com> | 2012-09-26 20:15:23 -0700 |
| commit | e8fe718bfd4d88b0bc59117326a14a10f2598568 (patch) | |
| tree | 5fdc1f4bfbd51f490ee30a846491f4c0e6dfac4b /src/libcore/vec.rs | |
| parent | 64de6d638da71f7b3a55d663b194b95f7f06d6c8 (diff) | |
| download | rust-e8fe718bfd4d88b0bc59117326a14a10f2598568.tar.gz rust-e8fe718bfd4d88b0bc59117326a14a10f2598568.zip | |
core: Replace map/map_default with map_ref/map_default_ref
Diffstat (limited to 'src/libcore/vec.rs')
| -rw-r--r-- | src/libcore/vec.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libcore/vec.rs b/src/libcore/vec.rs index 50011dbacec..a0516116bdf 100644 --- a/src/libcore/vec.rs +++ b/src/libcore/vec.rs @@ -969,7 +969,7 @@ pure fn find<T: Copy>(v: &[T], f: fn(T) -> bool) -> Option<T> { */ pure fn find_between<T: Copy>(v: &[T], start: uint, end: uint, f: fn(T) -> bool) -> Option<T> { - position_between(v, start, end, f).map(|i| v[i]) + position_between(v, start, end, f).map(|i| v[*i]) } /** @@ -992,7 +992,7 @@ pure fn rfind<T: Copy>(v: &[T], f: fn(T) -> bool) -> Option<T> { */ pure fn rfind_between<T: Copy>(v: &[T], start: uint, end: uint, f: fn(T) -> bool) -> Option<T> { - rposition_between(v, start, end, f).map(|i| v[i]) + rposition_between(v, start, end, f).map(|i| v[*i]) } /// Find the first index containing a matching value |
