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

29
Cargo.lock generated
View file

@ -1191,7 +1191,7 @@ checksum = "f93d03419cb5950ccfd3daf3ff1c7a36ace64609a1a8746d493df1ca0afde0fa"
dependencies = [ dependencies = [
"cssparser-macros", "cssparser-macros",
"dtoa-short", "dtoa-short",
"itoa 1.0.1", "itoa",
"matches", "matches",
"phf", "phf",
"proc-macro2", "proc-macro2",
@ -2693,7 +2693,7 @@ checksum = "75f43d41e26995c17e71ee126451dd3941010b0514a81a9d11f3b341debc2399"
dependencies = [ dependencies = [
"bytes", "bytes",
"fnv", "fnv",
"itoa 1.0.1", "itoa",
] ]
[[package]] [[package]]
@ -2740,7 +2740,7 @@ dependencies = [
"http-body", "http-body",
"httparse", "httparse",
"httpdate", "httpdate",
"itoa 1.0.1", "itoa",
"pin-project-lite", "pin-project-lite",
"socket2 0.4.9", "socket2 0.4.9",
"tokio", "tokio",
@ -2918,10 +2918,13 @@ dependencies = [
] ]
[[package]] [[package]]
name = "itoa" name = "itertools"
version = "0.4.8" version = "0.10.5"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b71991ff56294aa922b450139ee08b3bfc70982c6b2c7562771375cf73542dd4" checksum = "b0fd2260e829bddf4cb6ea802289de2f86d6a7a690192fbe91b3f46e0f2c8473"
dependencies = [
"either",
]
[[package]] [[package]]
name = "itoa" name = "itoa"
@ -4862,7 +4865,7 @@ dependencies = [
"image", "image",
"indexmap", "indexmap",
"ipc-channel", "ipc-channel",
"itertools", "itertools 0.8.0",
"jstraceable_derive", "jstraceable_derive",
"keyboard-types", "keyboard-types",
"lazy_static", "lazy_static",
@ -5102,7 +5105,7 @@ version = "1.0.107"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6b420ce6e3d8bd882e9b243c6eed35dbc9a6110c9769e74b584e0d68d1f20c65" checksum = "6b420ce6e3d8bd882e9b243c6eed35dbc9a6110c9769e74b584e0d68d1f20c65"
dependencies = [ dependencies = [
"itoa 1.0.1", "itoa",
"ryu", "ryu",
"serde", "serde",
] ]
@ -5114,7 +5117,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d3491c14715ca2294c4d6a88f15e84739788c1d030eed8c110436aafdaa2f3fd" checksum = "d3491c14715ca2294c4d6a88f15e84739788c1d030eed8c110436aafdaa2f3fd"
dependencies = [ dependencies = [
"form_urlencoded", "form_urlencoded",
"itoa 1.0.1", "itoa",
"ryu", "ryu",
"serde", "serde",
] ]
@ -5361,7 +5364,7 @@ dependencies = [
name = "servo_config_plugins" name = "servo_config_plugins"
version = "0.0.1" version = "0.0.1"
dependencies = [ dependencies = [
"itertools", "itertools 0.8.0",
"proc-macro2", "proc-macro2",
"quote", "quote",
"syn 2.0.37", "syn 2.0.37",
@ -5781,8 +5784,8 @@ dependencies = [
"fxhash", "fxhash",
"html5ever", "html5ever",
"indexmap", "indexmap",
"itertools", "itertools 0.10.5",
"itoa 0.4.8", "itoa",
"lazy_static", "lazy_static",
"log", "log",
"malloc_size_of", "malloc_size_of",
@ -6073,7 +6076,7 @@ version = "0.3.23"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "59e399c068f43a5d116fedaf73b203fa4f9c519f17e2b34f63221d3792f81446" checksum = "59e399c068f43a5d116fedaf73b203fa4f9c519f17e2b34f63221d3792f81446"
dependencies = [ dependencies = [
"itoa 1.0.1", "itoa",
"libc", "libc",
"num_threads", "num_threads",
"serde", "serde",

View file

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

View file

@ -619,7 +619,10 @@ impl Color {
let mut serialization = [b'0'; 6]; let mut serialization = [b'0'; 6];
let space_padding = 6 - total; let space_padding = 6 - total;
let mut written = space_padding; 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 { if let Some(unit) = unit {
written += (&mut serialization[written..]) written += (&mut serialization[written..])
.write(unit.as_bytes()) .write(unit.as_bytes())