Skip to content

Commit

Permalink
deps: Update to itoa 1.
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
waywardmonkeys authored and seanmonstar committed Dec 14, 2021
1 parent f25fbb5 commit abe6512
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
3 changes: 2 additions & 1 deletion src/header/value.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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};

Expand Down Expand Up @@ -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,
Expand Down

0 comments on commit abe6512

Please sign in to comment.