]> git.lizzy.rs Git - rust.git/commitdiff
Auto merge of #32204 - alexcrichton:redesign-char-encoding-types, r=aturon
authorbors <bors@rust-lang.org>
Tue, 22 Mar 2016 23:05:39 +0000 (16:05 -0700)
committerbors <bors@rust-lang.org>
Tue, 22 Mar 2016 23:05:39 +0000 (16:05 -0700)
std: Change `encode_utf{8,16}` to return iterators

Currently these have non-traditional APIs which take a buffer and report how
much was filled in, but they're not necessarily ergonomic to use. Returning an
iterator which *also* exposes an underlying slice shouldn't result in any
performance loss as it's just a lazy version of the same implementation, and
it's also much more ergonomic!

cc #27784


No differences found