diff options
author | Anthony Ramine <n.oxyde@gmail.com> | 2018-01-22 19:58:01 +0100 |
---|---|---|
committer | Anthony Ramine <n.oxyde@gmail.com> | 2018-01-23 10:41:42 +0100 |
commit | cd8f96cc9edd5debbb738ffa3124e3d46c5d8bcf (patch) | |
tree | 5c6f46a882b529a5de7b792d44b0ee432ee327bd /components/style/macros.rs | |
parent | 3672856efa31195aaa89b007f790df925474001a (diff) | |
download | servo-cd8f96cc9edd5debbb738ffa3124e3d46c5d8bcf.tar.gz servo-cd8f96cc9edd5debbb738ffa3124e3d46c5d8bcf.zip |
Change ToCss to take a CssWriter<W>
This more concrete wrapper type can write a prefix the very first time something
is written to it. This allows removing plenty of useless monomorphisations caused
by the former W/SequenceWriter<W> pair of types.
Diffstat (limited to 'components/style/macros.rs')
-rw-r--r-- | components/style/macros.rs | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/components/style/macros.rs b/components/style/macros.rs index aa505498d3b..ac795bdb09f 100644 --- a/components/style/macros.rs +++ b/components/style/macros.rs @@ -91,8 +91,11 @@ macro_rules! define_numbered_css_keyword_enum { } } - impl ::style_traits::values::ToCss for $name { - fn to_css<W>(&self, dest: &mut W) -> ::std::fmt::Result + impl ::style_traits::ToCss for $name { + fn to_css<W>( + &self, + dest: &mut ::style_traits::CssWriter<W>, + ) -> ::std::fmt::Result where W: ::std::fmt::Write, { |