diff options
| author | Brian Anderson <banderson@mozilla.com> | 2012-03-18 15:26:05 -0700 |
|---|---|---|
| committer | Brian Anderson <banderson@mozilla.com> | 2012-03-18 15:26:05 -0700 |
| commit | d6ded6788dbf24a6545f579a23a92553efae1c2e (patch) | |
| tree | d67c00557f5902249c8775f63dc7f8a25261b4ff | |
| parent | 132266b2cbb0f92608fb7f1fca90d2b743f7759d (diff) | |
| download | rust-d6ded6788dbf24a6545f579a23a92553efae1c2e.tar.gz rust-d6ded6788dbf24a6545f579a23a92553efae1c2e.zip | |
core: vec::filter_map doesn't require a copyable T
| -rw-r--r-- | src/libcore/vec.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libcore/vec.rs b/src/libcore/vec.rs index 6beda8306e2..09292fc1161 100644 --- a/src/libcore/vec.rs +++ b/src/libcore/vec.rs @@ -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 { |
