Merge "Upgrade itoa to 1.0.4" am: c5f7f6f82c am: 02fd9c299e Original change: https://android-review.googlesource.com/c/platform/external/rust/crates/itoa/+/2344963 Change-Id: Ie4a9fab1cf45d55eb87f1e2e338ce538f2ac2977 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> 
tree: 3e22c3561aab05ecfb4ca002c32c468efd1417d0
  1. .github/
  2. benches/
  3. patches/
  4. src/
  5. tests/
  6. .cargo_vcs_info.json
  7. .clippy.toml
  8. .gitignore
  9. Android.bp
  10. Cargo.toml
  11. Cargo.toml.orig
  12. cargo2android.json
  13. LICENSE
  14. LICENSE-APACHE
  15. LICENSE-MIT
  16. METADATA
  17. MODULE_LICENSE_APACHE2
  18. OWNERS
  19. README.md
  20. TEST_MAPPING
README.md

itoa

This crate provides a fast conversion of integer primitives to decimal strings. The implementation comes straight from libcore but avoids the performance penalty of going through core::fmt::Formatter.

See also ryu for printing floating point primitives.

Version requirement: rustc 1.36+

[dependencies] itoa = "1.0" 

Example

fn main() { let mut buffer = itoa::Buffer::new(); let printed = buffer.format(128u64); assert_eq!(printed, "128"); } 

Performance (lower is better)

performance

License