mirror of
https://github.com/servo/servo.git
synced 2025-10-04 02:29:12 +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
|
@ -177,7 +177,7 @@ impl generic::LineDirection for LineDirection {
|
|||
dest.write_str("to ")?;
|
||||
}
|
||||
x.to_css(dest)?;
|
||||
dest.write_str(" ")?;
|
||||
dest.write_char(' ')?;
|
||||
y.to_css(dest)
|
||||
},
|
||||
}
|
||||
|
|
|
@ -53,7 +53,7 @@ impl ToCss for Position {
|
|||
W: Write,
|
||||
{
|
||||
self.horizontal.to_css(dest)?;
|
||||
dest.write_str(" ")?;
|
||||
dest.write_char(' ')?;
|
||||
self.vertical.to_css(dest)
|
||||
}
|
||||
}
|
||||
|
|
|
@ -161,7 +161,7 @@ impl ToCss for TextOverflow {
|
|||
self.second.to_css(dest)?;
|
||||
} else {
|
||||
self.first.to_css(dest)?;
|
||||
dest.write_str(" ")?;
|
||||
dest.write_char(' ')?;
|
||||
self.second.to_css(dest)?;
|
||||
}
|
||||
Ok(())
|
||||
|
|
|
@ -40,6 +40,6 @@ impl ToCss for Time {
|
|||
W: Write,
|
||||
{
|
||||
self.seconds().to_css(dest)?;
|
||||
dest.write_str("s")
|
||||
dest.write_char('s')
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue