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:
Jonathan Kew 2023-01-29 22:01:28 +00:00 committed by Martin Robinson
parent 05fb1b62b7
commit 8a2cfc0b24
52 changed files with 131 additions and 129 deletions

View file

@ -14,6 +14,7 @@ use selectors::parser::{Combinator, Component};
use selectors::OpaqueElement;
use smallvec::SmallVec;
use std::fmt;
use std::fmt::Write;
/// A trait to abstract the collection of invalidations for a given pass.
pub trait InvalidationProcessor<'a, E>
@ -257,7 +258,7 @@ impl<'a> fmt::Debug for Invalidation<'a> {
}
component.to_css(f)?;
}
f.write_str(")")
f.write_char(')')
}
}