core: vec::filter_map doesn't require a copyable T
This commit is contained in:
parent
132266b2cb
commit
d6ded6788d
1 changed files with 1 additions and 1 deletions
|
|
@ -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 {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue