KokaKiwi / rust-hex

A basic crate to encode values to hexadecimal representation. Originally extracted from rustc-serialize.
https://crates.io/crates/hex
Apache License 2.0
201 stars 55 forks source link

How do I encode to a writer in 0.4? #54

Open dpc opened 3 years ago

dpc commented 3 years ago

There used to be write_hex that encoded straight into Writer, but now it's gone and I'm not sure what's the most idiomatic way to replace it without temporarily allocation.

KokaKiwi commented 3 years ago

Uhh yeah since 0.4 hex uses "from-iterator" types for encoding result and thus doesn't support to encode directly to Writer any more :x This "ability" will most surely come back in later versions (cf #37) but for now yeah there's sadly no way without allocating beforehand :(

I'll tag this issue as "bug" or something in order to have it somewhere for the "1.0" milestone