![](/style/images/good.png)
![](/style/images/bad.png)
Implement Default for some alloc/core iterators by the8472 · Pull Request #99929...
source link: https://github.com/rust-lang/rust/pull/99929
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
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.
Recommend
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK