Is the str returned from `Buffer::format` guaranteed to be no longer than 24?
NobodyXu opened this issue · 2 comments
NobodyXu commented
Hi
I am implementing ParkMyCar/compact_str#16 which uses ryu::Buffer::format
to format f32
and f64
into CompactStr
.
When looking at the code, I realized that in the current implementation, ryu::Buffer::format
can return a string that is at most 24 bytes long.
I want to know if this is a behavior guaranteed to exist as long as no new major release happen.
Thanks in advance.
dtolnay commented
This is not guaranteed.
NobodyXu commented
Thanks!