dtolnay / ryu

Fast floating point to string conversion
Apache License 2.0
606 stars 27 forks source link

Make `pretty` mod or `write_to_ryu_buffer` function public? #5

Closed Alexhuszagh closed 5 years ago

Alexhuszagh commented 5 years ago

I already have an intermediate stack buffer, but would like to use the pretty formatting via pretty:{f2s_buffered_n, d2s_buffered_n}. Right now, this is publicly exposed via Float::write_to_ryu_buffer, however, this is very clearly not a public API and likely to change.

Would you be willing to make any guarantees about the write_to_ryu_buffer method in the Float trait, either in the current form, or some new form, or expose the pretty:{f2s_buffered_n, d2s_buffered_n} functions publicly?

dtolnay commented 5 years ago

How's this? #6

Alexhuszagh commented 5 years ago

@dtolnay Excellent, thank you!

dtolnay commented 5 years ago

Okay. :) I published 0.2.7 with those functions exposed. Thanks!