rust/library/alloc/src/collections
bors 9fa6b3c157 Auto merge of #99929 - the8472:default-iters, r=scottmcm
Implement Default for some alloc/core iterators

Add `Default` impls to the following collection iterators:

* slice::{Iter, IterMut}
* binary_heap::IntoIter
* btree::map::{Iter, IterMut, Keys, Values, Range, IntoIter, IntoKeys, IntoValues}
* btree::set::{Iter, IntoIter, Range}
* linked_list::IntoIter
* vec::IntoIter

and these adapters:

* adapters::{Chain, Cloned, Copied, Rev, Enumerate, Flatten, Fuse, Rev}

For iterators which are generic over allocators it only implements it for the global allocator because we can't conjure an allocator from nothing or would have to turn the allocator field into an `Option` just for this change.

These changes will be insta-stable.

ACP: https://github.com/rust-lang/libs-team/issues/77
2023-03-25 06:29:46 +00:00
..
binary_heap rewrite iterator Default tests as doctests 2023-02-28 21:00:00 +01:00
btree Auto merge of #99929 - the8472:default-iters, r=scottmcm 2023-03-25 06:29:46 +00:00
linked_list rewrite iterator Default tests as doctests 2023-02-28 21:00:00 +01:00
vec_deque Rollup merge of #106276 - Sp00ph:unify_slice_ranges, r=the8472 2023-03-11 12:55:41 +01:00
linked_list.rs rewrite iterator Default tests as doctests 2023-02-28 21:00:00 +01:00
mod.rs Modify comment syntax error 2022-11-07 14:33:33 +08:00