diff options
author | bors-servo <lbergstrom+bors@mozilla.com> | 2017-06-17 04:53:32 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-06-17 04:53:32 -0700 |
commit | effd6f2f877e767352b45fc35c8066a56c1612b7 (patch) | |
tree | aaa59e7dbc870928fb3669e788443cf2fe7c265f /components/style/macros.rs | |
parent | 9c2dffdf72efe4274bb514407edc552b14fc0a4d (diff) | |
parent | bc9bc1d340ea35d10d290de685d9fa4f300c0b5b (diff) | |
download | servo-effd6f2f877e767352b45fc35c8066a56c1612b7.tar.gz servo-effd6f2f877e767352b45fc35c8066a56c1612b7.zip |
Auto merge of #17382 - servo:derive-all-the-things, r=emilio
Derive more ToCss impls
<!-- Reviewable:start -->
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/17382)
<!-- Reviewable:end -->
Diffstat (limited to 'components/style/macros.rs')
-rw-r--r-- | components/style/macros.rs | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/components/style/macros.rs b/components/style/macros.rs index 151cfaa2f60..7899ef61083 100644 --- a/components/style/macros.rs +++ b/components/style/macros.rs @@ -82,17 +82,11 @@ macro_rules! add_impls_for_keyword_enum { macro_rules! define_keyword_type { ($name: ident, $css: expr) => { - #[derive(Clone, PartialEq, Copy)] - #[cfg_attr(feature = "servo", derive(HeapSizeOf))] #[allow(missing_docs)] + #[cfg_attr(feature = "servo", derive(HeapSizeOf))] + #[derive(Clone, Copy, PartialEq, ToCss)] pub struct $name; - impl ::style_traits::ToCss for $name { - fn to_css<W>(&self, dest: &mut W) -> ::std::fmt::Result where W: ::std::fmt::Write { - write!(dest, $css) - } - } - impl $crate::properties::animated_properties::Animatable for $name { #[inline] fn add_weighted(&self, _other: &Self, _self_progress: f64, _other_progress: f64) |