about summary refs log tree commit diff
path: root/src/liballoc_jemalloc
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2017-08-15 22:28:23 +0000
committerbors <bors@rust-lang.org>2017-08-15 22:28:23 +0000
commit1e60a477a3f28ec5dc6e93e2714320d829bd7942 (patch)
treeae563ec808947783758a8222aaac2894cb294640 /src/liballoc_jemalloc
parentf25c2283b3f8a7518b2f83a252b50d29d9bfbfda (diff)
parent1af42261e142c20c1aed30732ad77bf3560318a1 (diff)
downloadrust-1e60a477a3f28ec5dc6e93e2714320d829bd7942.tar.gz
rust-1e60a477a3f28ec5dc6e93e2714320d829bd7942.zip
Auto merge of #43245 - Gankro:drain-filter, r=sfackler
Add Vec::drain_filter

This implements the API proposed in #43244.

So I spent like half a day figuring out how to implement this in some awesome super-optimized unsafe way, which had me very confident this was worth putting into the stdlib.

Then I looked at the impl for `retain`, and was like "oh dang". I compared the two and they basically ended up being the same speed. And the `retain` impl probably translates to DoubleEndedIter a lot more cleanly if we ever want that.

So now I'm not totally confident this needs to go in the stdlib, but I've got two implementations and an amazingly robust test suite, so I figured I might as well toss it over the fence for discussion.
Diffstat (limited to 'src/liballoc_jemalloc')
0 files changed, 0 insertions, 0 deletions