rust/src/liballoc
bors 1e60a477a3 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.
2017-08-15 22:28:23 +00:00
..
benches Auto merge of #43010 - stjepang:stabilize-sort-unstable, r=alexcrichton 2017-07-02 23:54:32 +00:00
btree Auto merge of #43794 - Eijebong:fix_typos, r=lukaramu,steveklanik,imperio 2017-08-12 05:52:19 +00:00
tests Auto merge of #43245 - Gankro:drain-filter, r=sfackler 2017-08-15 22:28:23 +00:00
allocator.rs Auto merge of #43815 - alexcrichton:optimize-alloc, r=sfackler 2017-08-13 19:28:57 +00:00
arc.rs Fix broken links in Arc documentation 2017-08-10 18:03:22 -04:00
binary_heap.rs Merge crate collections into alloc 2017-06-13 23:37:34 -07:00
borrow.rs Merge crate collections into alloc 2017-06-13 23:37:34 -07:00
boxed.rs Add Box::into_unique 2017-07-22 20:38:40 +02:00
boxed_test.rs Direct conversions between slices and boxes. 2017-02-06 18:53:13 -05:00
Cargo.toml Merge crate collections into alloc 2017-06-13 23:37:34 -07:00
fmt.rs Add missing link in fmt::format function 2017-08-12 16:54:12 +02:00
heap.rs std: Tag OOM functions as #[cold] 2017-08-11 15:59:11 -07:00
lib.rs Auto merge of #43373 - alexcrichton:stabilize-1.20.0, r=aturon 2017-07-26 23:40:48 +00:00
linked_list.rs Add Box::into_unique 2017-07-22 20:38:40 +02:00
macros.rs Merge crate collections into alloc 2017-06-13 23:37:34 -07:00
range.rs Revert "Stabilize RangeArgument" 2017-06-30 08:34:53 -10:00
raw_vec.rs std: Unsafe-away runtime checks in Vec 2017-08-12 11:06:45 -07:00
rc.rs Add Box::into_unique 2017-07-22 20:38:40 +02:00
slice.rs Clarify that sort_unstable is deterministic 2017-07-21 00:58:16 +02:00
str.rs Indicate how to turn byte slices back into a string slice. 2017-08-05 08:27:25 -04:00
string.rs Auto merge of #43500 - murarth:string-retain, r=alexcrichton 2017-08-15 16:21:28 +00:00
vec.rs Auto merge of #43245 - Gankro:drain-filter, r=sfackler 2017-08-15 22:28:23 +00:00
vec_deque.rs Fixed extra cases found in better checking. 2017-08-01 23:01:24 +01:00