aboutsummaryrefslogtreecommitdiffstats
path: root/components/style/macros.rs
diff options
context:
space:
mode:
authorbors-servo <lbergstrom+bors@mozilla.com>2017-06-17 04:53:32 -0700
committerGitHub <noreply@github.com>2017-06-17 04:53:32 -0700
commiteffd6f2f877e767352b45fc35c8066a56c1612b7 (patch)
treeaaa59e7dbc870928fb3669e788443cf2fe7c265f /components/style/macros.rs
parent9c2dffdf72efe4274bb514407edc552b14fc0a4d (diff)
parentbc9bc1d340ea35d10d290de685d9fa4f300c0b5b (diff)
downloadservo-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.rs10
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)