]> git.lizzy.rs Git - rust.git/commit
Auto merge of #35656 - Stebalien:fused, r=alexcrichton
authorbors <bors@rust-lang.org>
Tue, 23 Aug 2016 14:46:52 +0000 (07:46 -0700)
committerGitHub <noreply@github.com>
Tue, 23 Aug 2016 14:46:52 +0000 (07:46 -0700)
commit0bd99f9d5c3bb10920f33819b38392137f7bfa11
treec4ab1e85690bc75a19094186ed62cbed6ef3eaca
parent43204fff5d0a656f8a94bfff3129e04bc9d30ad4
parentde91872a3337dddf9a0d27df7bfb64f3965c81b0
Auto merge of #35656 - Stebalien:fused, r=alexcrichton

Implement 1581 (FusedIterator)

* [ ] Implement on patterns. See https://github.com/rust-lang/rust/issues/27721#issuecomment-239638642.
* [ ] Handle OS Iterators. A bunch of iterators (`Args`, `Env`, etc.) in libstd wrap platform specific iterators. The current ones all appear to be well-behaved but can we assume that future ones will be?
* [ ] Does someone want to audit this? On first glance, all of the iterators on which I implemented `FusedIterator` appear to be well-behaved but there are a *lot* of them so a second pair of eyes would be nice.
* I haven't touched rustc internal iterators (or the internal rand) because rustc doesn't actually call `fuse()`.
* `FusedIterator` can't be implemented on `std::io::{Bytes, Chars}`.

Closes: #35602 (Tracking Issue)
Implements: rust-lang/rfcs#1581
src/libcollections/binary_heap.rs
src/libcollections/btree/map.rs
src/libcollections/linked_list.rs
src/libcollections/string.rs
src/libcollections/vec_deque.rs
src/libcore/iter/traits.rs
src/libstd/collections/hash/map.rs
src/libstd/lib.rs