about summary refs log tree commit diff
path: root/src/libstd/sync
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2015-05-06 06:08:27 +0000
committerbors <bors@rust-lang.org>2015-05-06 06:08:27 +0000
commit6afa669524f550744834b5cd031dc3918e65905f (patch)
tree1f462ac678beb62923a0d033ffb1d56179bfd43e /src/libstd/sync
parent5b04c16bd6954a28e1bcf5fcfc7fb9a784ca2914 (diff)
parent3fcbc31489cafc731d8c7212ffc7341fa5d80299 (diff)
downloadrust-6afa669524f550744834b5cd031dc3918e65905f.tar.gz
rust-6afa669524f550744834b5cd031dc3918e65905f.zip
Auto merge of #25035 - Stebalien:iter, r=aturon
Specifically, make count, nth, and last call the corresponding methods on the underlying iterator where possible. This way, if the underlying iterator has an optimized count, nth, or last implementations (e.g. slice::Iter), these methods will propagate these optimizations.

Additionally, change Skip::next to take advantage of a potentially optimized nth method on the underlying iterator.

This covers:

* core::iter::Chain: count, last, nth
* core::iter::Enumerate: count, nth
* core::iter::Peekable: count, last, nth
* core::iter::Skip: count, last, next (should call nth), nth
* core::iter::Take: nth
* core::iter::Fuse: count, last, nth

of #24214.
Diffstat (limited to 'src/libstd/sync')
0 files changed, 0 insertions, 0 deletions