commit | 5068c0ddc14aeb3ed5c894cabc22b0d264af8f61 | [log] [tgz] |
---|---|---|
author | James Farrell <jamesfarrell@google.com> | Tue Oct 08 21:25:24 2024 +0000 |
committer | James Farrell <jamesfarrell@google.com> | Tue Oct 08 21:25:24 2024 +0000 |
tree | c96ceff2a9a4fe0e40611fad539e9e9aaea87795 | |
parent | e390b0dcd422417b0e1ff8a0ade16145f9a7c2e0 [diff] |
Migrate 25 crates to monorepo itoa percent-encoding untrusted arbitrary nix arc-swap arrayvec axum-core bindgen-cli cov-mark equivalent fixedbitset foreign-types foreign-types-shared fxhash http hyper kernlog lazycell libtest-mimic libz-sys merge merge_derive mls-rs mls-rs-crypto-traits Bug: http://b/339424309 Test: treehugger Change-Id: I40a95e86e75eb3dc1b872154ecceba0074161d6a
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"
fn main() { let mut buffer = itoa::Buffer::new(); let printed = buffer.format(128u64); assert_eq!(printed, "128"); }