style: Update stylo to itertools:0.10, itoa:1.0 and toml:0.5

Differential Revision: https://phabricator.services.mozilla.com/D149454
This commit is contained in:
Mike Hommey 2022-06-16 20:44:03 +00:00 committed by Martin Robinson
parent becb855b3a
commit fb95cb7993
3 changed files with 22 additions and 16 deletions

View file

@ -48,8 +48,8 @@ euclid = "0.22"
fxhash = "0.2"
html5ever = { version = "0.26", optional = true }
indexmap = "1.0"
itertools = "0.8"
itoa = "0.4"
itertools = "0.10"
itoa = "1.0"
lazy_static = "1"
log = { version = "0.4", features = ["std"] }
malloc_size_of = { path = "../malloc_size_of" }

View file

@ -619,7 +619,10 @@ impl Color {
let mut serialization = [b'0'; 6];
let space_padding = 6 - total;
let mut written = space_padding;
written += itoa::write(&mut serialization[written..], value).unwrap();
let mut buf = itoa::Buffer::new();
let s = buf.format(value);
(&mut serialization[written..]).write_all(s.as_bytes()).unwrap();
written += s.len();
if let Some(unit) = unit {
written += (&mut serialization[written..])
.write(unit.as_bytes())