Description
std
has a new, unstable, type: std::ascii:Char
. This should get a corresponding impl Extend<ascii::Char> for String
.
Alphanumeric
(and soon Alphabetic
#1587) sample u8
ASCII values since these are smaller than char
and may be used to extend a String
more efficiently, albeit unsafely. Switching these to ascii::Char
(once stable) should give us a fast, safe alternative.
To keep type inference, we should replace the existing implementations of Distribution
for these types. This is a breaking change (but an additional impl would also be breaking).
Alternative
We could (once impl Extend<ascii::Char> for String
is available) switch to ascii::Char
before the type is stabilized.
Motivation: allow us to release Rust v1.0 without expecting to make a breaking change here later.