mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
Replace some more uses of write!
in components/style
This commit is contained in:
parent
fae2da0f59
commit
5d06c9959f
12 changed files with 33 additions and 28 deletions
|
@ -327,7 +327,8 @@ impl ToCss for System {
|
|||
System::Additive => dest.write_str("additive"),
|
||||
System::Fixed { first_symbol_value } => {
|
||||
if let Some(value) = first_symbol_value {
|
||||
write!(dest, "fixed {}", value)
|
||||
dest.write_str("fixed ")?;
|
||||
value.to_css(dest)
|
||||
} else {
|
||||
dest.write_str("fixed")
|
||||
}
|
||||
|
@ -455,7 +456,7 @@ where W: fmt::Write {
|
|||
|
||||
fn bound_to_css<W>(range: Option<i32>, dest: &mut W) -> fmt::Result where W: fmt::Write {
|
||||
if let Some(finite) = range {
|
||||
write!(dest, "{}", finite)
|
||||
finite.to_css(dest)
|
||||
} else {
|
||||
dest.write_str("infinite")
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue