deps: Update to itoa 1.

In itoa 1, the interface has been slimmed down and the fmt method
is no longer present, so expand to the code that was there previously.
This commit is contained in:
Bruce Mitchener
2021-12-14 14:17:04 +07:00
committed by Sean McArthur
parent f25fbb579d
commit abe651273f
2 changed files with 3 additions and 2 deletions
+1 -1
View File
@@ -26,7 +26,7 @@ rust-version = "1.46.0"
[dependencies]
bytes = "1"
fnv = "1.0.5"
itoa = "0.4.1"
itoa = "1"
[dev-dependencies]
indexmap = "1.0"
+2 -1
View File
@@ -2,6 +2,7 @@ use bytes::{Bytes, BytesMut};
use std::convert::TryFrom;
use std::error::Error;
use std::fmt::Write;
use std::str::FromStr;
use std::{cmp, fmt, mem, str};
@@ -427,7 +428,7 @@ macro_rules! from_integers {
// full value fits inline, so don't allocate!
BytesMut::new()
};
let _ = ::itoa::fmt(&mut buf, num);
let _ = buf.write_str(::itoa::Buffer::new().format(num));
HeaderValue {
inner: buf.freeze(),
is_sensitive: false,