Replace some more uses of write! in components/style

This commit is contained in:
Simon Sapin 2017-09-02 19:11:44 +02:00
parent fae2da0f59
commit 5d06c9959f
12 changed files with 33 additions and 28 deletions

View file

@ -398,7 +398,9 @@ impl MediaExpressionValue {
dest.write_str(if v { "1" } else { "0" })
},
MediaExpressionValue::IntRatio(a, b) => {
write!(dest, "{}/{}", a, b)
a.to_css(dest)?;
dest.write_char('/')?;
b.to_css(dest)
},
MediaExpressionValue::Resolution(ref r) => r.to_css(dest),
MediaExpressionValue::Ident(ref ident) => {