core: vec::filter_map doesn't require a copyable T

This commit is contained in:
Brian Anderson 2012-03-18 15:26:05 -07:00
parent 132266b2cb
commit d6ded6788d

View file

@ -430,7 +430,7 @@ Apply a function to each element of a vector and return the results
If function `f` returns `none` then that element is excluded from
the resulting vector.
"]
fn filter_map<T: copy, U: copy>(v: [T], f: fn(T) -> option<U>)
fn filter_map<T, U: copy>(v: [T], f: fn(T) -> option<U>)
-> [U] {
let mut result = [];
for elem: T in v {