numtoa icon indicating copy to clipboard operation
numtoa copied to clipboard

Buffer size check is too aggressive

Open dtolnay opened this issue 7 years ago • 6 comments

If I know for sure that I have numbers in the range 0 .. 100_000_000, I want to be able to use an 8-byte buffer rather than needing 20 bytes in debug mode. Maybe an unsafe way to skip the check? This is why https://github.com/mmstick/numtoa/issues/5#issuecomment-274347968 panics in debug mode even though the code is correct.

dtolnay avatar Jan 22 '17 18:01 dtolnay