]> git.lizzy.rs Git - rust.git/commitdiff
Rollup merge of #33849 - ranma42:escape-iters-count, r=alexcrichton
authorManish Goregaokar <manishsmail@gmail.com>
Sat, 28 May 2016 14:22:16 +0000 (19:52 +0530)
committerManish Goregaokar <manishsmail@gmail.com>
Sat, 28 May 2016 14:22:16 +0000 (19:52 +0530)
Implement `count` for `EscapeUnicode`

and cleanup the code for `count` for `EscapeDefault` (instead of repeating the `match` for `size_hint` and `count`).

This PR marks EscapeUnicode and EscapeDefault as ExactSizeIterator. The constraints for the trait implementations held even before this PR, but I am not sure if this is something we want to guarantee/expose (I would love feedback on this, especially on what would be the appropriate way to handle stabilisation, if needed).

Part of #24214, split from #31049.

The test for `count` was added in #33103.


Trivial merge