]> git.lizzy.rs Git - rust.git/commit
Auto merge of #38149 - bluss:is-empty, r=alexcrichton
authorbors <bors@rust-lang.org>
Wed, 7 Dec 2016 07:15:31 +0000 (07:15 +0000)
committerbors <bors@rust-lang.org>
Wed, 7 Dec 2016 07:15:31 +0000 (07:15 +0000)
commit5938eba4e30b766751483e93776a87a4db1681f4
tree1e497c14aaafb3a0471925118e5efb62963eb66b
parent02ea82ddb8315249067afb2f800d62b4ca1f7678
parentd53f82c1d037bf224a72a11747e7788f14b52db5
Auto merge of #38149 - bluss:is-empty, r=alexcrichton

Forward more ExactSizeIterator methods and `is_empty` edits

- Forward ExactSizeIterator methods in more places, like `&mut I` and `Box<I>` iterator impls.
- Improve `VecDeque::is_empty` itself (see commit 4)
- All the collections iterators now have `len` or `is_empty` forwarded if doing so is a benefit. In the remaining cases, they already use a simple size hint (using something like a stored `usize` value), which is sufficient for the default implementation of len and is_empty.
src/liballoc/boxed.rs