mirror of
https://github.com/servo/servo.git
synced 2025-10-17 08:49:21 +01:00
style: Use write_char in place of write_str when serializing single-character literals
Generated by running find servo/components/style -name "*.rs" -exec perl -p -i -e "s/write_str\(\"(.)\"\)/write_char('\1')/g" {} \; (and then added `use std::fmt::Write;` in a couple of places to fix build errors that arose). Differential Revision: https://phabricator.services.mozilla.com/D168217
This commit is contained in:
parent
05fb1b62b7
commit
8a2cfc0b24
52 changed files with 131 additions and 129 deletions
|
@ -418,7 +418,7 @@ where
|
|||
dest.write_str(" round ")?;
|
||||
self.round.to_css(dest)?;
|
||||
}
|
||||
dest.write_str(")")
|
||||
dest.write_char(')')
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -434,11 +434,11 @@ where
|
|||
dest.write_str("circle(")?;
|
||||
if self.radius != Default::default() {
|
||||
self.radius.to_css(dest)?;
|
||||
dest.write_str(" ")?;
|
||||
dest.write_char(' ')?;
|
||||
}
|
||||
dest.write_str("at ")?;
|
||||
self.position.to_css(dest)?;
|
||||
dest.write_str(")")
|
||||
dest.write_char(')')
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -454,13 +454,13 @@ where
|
|||
dest.write_str("ellipse(")?;
|
||||
if self.semiaxis_x != Default::default() || self.semiaxis_y != Default::default() {
|
||||
self.semiaxis_x.to_css(dest)?;
|
||||
dest.write_str(" ")?;
|
||||
dest.write_char(' ')?;
|
||||
self.semiaxis_y.to_css(dest)?;
|
||||
dest.write_str(" ")?;
|
||||
dest.write_char(' ')?;
|
||||
}
|
||||
dest.write_str("at ")?;
|
||||
self.position.to_css(dest)?;
|
||||
dest.write_str(")")
|
||||
dest.write_char(')')
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue