Skip to content

Commit abe6512

Browse files
waywardmonkeysseanmonstar
authored andcommitted
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.
1 parent f25fbb5 commit abe6512

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ rust-version = "1.46.0"
2626
[dependencies]
2727
bytes = "1"
2828
fnv = "1.0.5"
29-
itoa = "0.4.1"
29+
itoa = "1"
3030

3131
[dev-dependencies]
3232
indexmap = "1.0"

src/header/value.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ use bytes::{Bytes, BytesMut};
22

33
use std::convert::TryFrom;
44
use std::error::Error;
5+
use std::fmt::Write;
56
use std::str::FromStr;
67
use std::{cmp, fmt, mem, str};
78

@@ -427,7 +428,7 @@ macro_rules! from_integers {
427428
// full value fits inline, so don't allocate!
428429
BytesMut::new()
429430
};
430-
let _ = ::itoa::fmt(&mut buf, num);
431+
let _ = buf.write_str(::itoa::Buffer::new().format(num));
431432
HeaderValue {
432433
inner: buf.freeze(),
433434
is_sensitive: false,

0 commit comments

Comments
 (0)