style: Use ArcSlice for quotes.

This saves the intermediate allocation.

Differential Revision: https://phabricator.services.mozilla.com/D30546
This commit is contained in:
Emilio Cobos Álvarez 2019-05-16 23:04:31 +00:00
parent bbc77e3977
commit a109fbb7c8
9 changed files with 85 additions and 44 deletions

View file

@ -75,6 +75,16 @@ where
}
}
impl ToCss for crate::owned_str::OwnedStr {
#[inline]
fn to_css<W>(&self, dest: &mut CssWriter<W>) -> fmt::Result
where
W: Write,
{
serialize_string(self, dest)
}
}
impl ToCss for str {
#[inline]
fn to_css<W>(&self, dest: &mut CssWriter<W>) -> fmt::Result