-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Audit itoa #60
Comments
Uses of unsafe:
Given the need to initialize the string from right to left for performance, the only options I see would be:
I wonder if the need for that latter type has shown up anywhere else in safety-dance's audits? Or if anyone has any better ideas? |
If you only write byte values |
and making a new buffer type for this would be pretty trivial since you only need push, not all general buffer methods |
itoa
has fast functions for printing integers. It's a dependency ofserde_json
so is included in lots of things. It's by the awesome dtolnay so I suspect it's unlikely we can add safety, but maybe we can identify patterns that can be better supported in future Rust.https://github.com/dtolnay/itoa
The text was updated successfully, but these errors were encountered: