Remove some uses of write! in components/style

This commit is contained in:
Simon Sapin 2017-09-02 10:24:18 +02:00
parent 17aa04b712
commit 38043a71de
3 changed files with 11 additions and 4 deletions

View file

@ -424,7 +424,11 @@ impl ToCss for NoCalcLength {
NoCalcLength::FontRelative(length) => length.to_css(dest),
NoCalcLength::ViewportPercentage(length) => length.to_css(dest),
/* This should only be reached from style dumping code */
NoCalcLength::ServoCharacterWidth(CharacterWidth(i)) => write!(dest, "CharWidth({})", i),
NoCalcLength::ServoCharacterWidth(CharacterWidth(i)) => {
dest.write_str("CharWidth(")?;
i.to_css(dest)?;
dest.write_char(')')
}
#[cfg(feature = "gecko")]
NoCalcLength::Physical(length) => length.to_css(dest),
}