[librsvg] make_property! - use impl_property! where there was a bit of duplicated code
- From: Federico Mena Quintero <federico src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [librsvg] make_property! - use impl_property! where there was a bit of duplicated code
- Date: Tue, 12 Nov 2019 15:13:16 +0000 (UTC)
commit 9bef7f06ea3a443639d7394dbeb8defdacf1f255
Author: Federico Mena Quintero <federico gnome org>
Date: Tue Nov 12 08:34:24 2019 -0600
make_property! - use impl_property! where there was a bit of duplicated code
rsvg_internals/src/property_macros.rs | 11 +----------
1 file changed, 1 insertion(+), 10 deletions(-)
---
diff --git a/rsvg_internals/src/property_macros.rs b/rsvg_internals/src/property_macros.rs
index 27def0c1..7908d368 100644
--- a/rsvg_internals/src/property_macros.rs
+++ b/rsvg_internals/src/property_macros.rs
@@ -80,16 +80,7 @@ macro_rules! make_property {
pub struct $name(pub $type);
impl_default!($name, $name($default));
-
- impl crate::property_macros::Property<$computed_values_type> for $name {
- fn inherits_automatically() -> bool {
- $inherits_automatically
- }
-
- fn compute(&self, _v: &$computed_values_type) -> Self {
- self.clone()
- }
- }
+ impl_property!($computed_values_type, $name, $inherits_automatically);
impl crate::parsers::Parse for $name {
type Err = crate::error::ValueErrorKind;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]