diff options
| author | Brian Anderson <banderson@mozilla.com> | 2012-09-21 19:37:57 -0700 |
|---|---|---|
| committer | Brian Anderson <banderson@mozilla.com> | 2012-09-23 17:15:00 -0700 |
| commit | 4a78f9b16620489855da93c19be56f59431416f6 (patch) | |
| tree | 4b164738698203f474003682d5f0a5e23aa13377 /src/libcore/vec.rs | |
| parent | 92752a462a055d6478bd96dab37a740514992106 (diff) | |
| download | rust-4a78f9b16620489855da93c19be56f59431416f6.tar.gz rust-4a78f9b16620489855da93c19be56f59431416f6.zip | |
core: Demode option
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 1dea6dbd17c..7edd47f52d9 100644 --- a/src/libcore/vec.rs +++ b/src/libcore/vec.rs @@ -957,7 +957,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> { - option::map(position_between(v, start, end, f), |i| v[i]) + position_between(v, start, end, f).map(|i| v[i]) } /** @@ -980,7 +980,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> { - option::map(rposition_between(v, start, end, f), |i| v[i]) + rposition_between(v, start, end, f).map(|i| v[i]) } /// Find the first index containing a matching value |
