diff options
| author | Brian Anderson <banderson@mozilla.com> | 2012-09-28 13:00:07 -0700 |
|---|---|---|
| committer | Brian Anderson <banderson@mozilla.com> | 2012-09-28 16:57:36 -0700 |
| commit | 8766c2e35b6454ff51ab3deab3cd334ebd033da1 (patch) | |
| tree | f5f6d0c3a53908a8d91f7b1ab47f5bd35d729d69 /src/libcore/vec.rs | |
| parent | 517206fd0876c17d5e1540ea5c544a51adf086de (diff) | |
core: Demode patterns
Diffstat (limited to 'src/libcore/vec.rs')
| -rw-r--r-- | src/libcore/vec.rs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/libcore/vec.rs b/src/libcore/vec.rs index 4f3761bc70b..aba511f0a7f 100644 --- a/src/libcore/vec.rs +++ b/src/libcore/vec.rs @@ -809,7 +809,7 @@ pure fn filter_map<T, U: Copy>(v: &[T], f: fn(t: &T) -> Option<U>) for each(v) |elem| { match f(elem) { None => {/* no-op */ } - Some(result_elem) => unsafe { result.push(result_elem); } + Some(move result_elem) => unsafe { result.push(result_elem); } } } move result @@ -2289,7 +2289,7 @@ mod tests { #[test] fn test_dedup() { - fn case(-a: ~[uint], -b: ~[uint]) { + fn case(+a: ~[uint], +b: ~[uint]) { let mut v = a; v.dedup(); assert(v == b); @@ -3084,6 +3084,7 @@ mod tests { #[test] #[ignore(windows)] #[should_fail] + #[allow(non_implicitly_copyable_typarams)] fn test_grow_fn_fail() { let mut v = ~[]; do v.grow_fn(100) |i| { |
