diff options
author | Simon Sapin <simon.sapin@exyr.org> | 2017-06-22 02:01:08 +0200 |
---|---|---|
committer | Simon Sapin <simon.sapin@exyr.org> | 2017-06-22 02:02:31 +0200 |
commit | 837cb6ddb2e0a598316140900232ebc29e3bc9f9 (patch) | |
tree | b12d5b933f30790caa96baef1f9c3f79c6ef2d58 | |
parent | ed5485ed18535a1de9401c7c9499be26292e76fc (diff) | |
download | servo-837cb6ddb2e0a598316140900232ebc29e3bc9f9.tar.gz servo-837cb6ddb2e0a598316140900232ebc29e3bc9f9.zip |
Pass some 48-bytes closures by references instead of by value.
-rw-r--r-- | components/style/properties/helpers.mako.rs | 2 | ||||
-rw-r--r-- | components/style/properties/helpers/animated_properties.mako.rs | 2 | ||||
-rw-r--r-- | components/style/properties/properties.mako.rs | 12 |
3 files changed, 8 insertions, 8 deletions
diff --git a/components/style/properties/helpers.mako.rs b/components/style/properties/helpers.mako.rs index 54b5c313e36..990e9e6646e 100644 --- a/components/style/properties/helpers.mako.rs +++ b/components/style/properties/helpers.mako.rs @@ -333,7 +333,7 @@ let quirks_mode = context.quirks_mode; ::properties::substitute_variables_${property.ident}( &declared_value, &custom_props, - |value| { + &mut |value| { if let Some(ref mut cascade_info) = *cascade_info { cascade_info.on_cascade_property(&declaration, &value); diff --git a/components/style/properties/helpers/animated_properties.mako.rs b/components/style/properties/helpers/animated_properties.mako.rs index 8b5feb762c5..79e64d53fef 100644 --- a/components/style/properties/helpers/animated_properties.mako.rs +++ b/components/style/properties/helpers/animated_properties.mako.rs @@ -582,7 +582,7 @@ impl AnimationValue { &variables.url_data, variables.from_shorthand, &custom_props, - |v| { + &mut |v| { let declaration = match *v { DeclaredValue::Value(value) => { PropertyDeclaration::${prop.camel_case}(value.clone()) diff --git a/components/style/properties/properties.mako.rs b/components/style/properties/properties.mako.rs index 9fcb87a03b1..c20f2004386 100644 --- a/components/style/properties/properties.mako.rs +++ b/components/style/properties/properties.mako.rs @@ -373,13 +373,13 @@ impl PropertyDeclarationIdSet { value: &DeclaredValue<longhands::${property.ident}::SpecifiedValue>, % endif custom_properties: &Option<Arc<::custom_properties::ComputedValuesMap>>, - f: F, + f: &mut F, error_reporter: &ParseErrorReporter, quirks_mode: QuirksMode) % if property.boxed: - where F: FnOnce(&DeclaredValue<Box<longhands::${property.ident}::SpecifiedValue>>) + where F: FnMut(&DeclaredValue<Box<longhands::${property.ident}::SpecifiedValue>>) % else: - where F: FnOnce(&DeclaredValue<longhands::${property.ident}::SpecifiedValue>) + where F: FnMut(&DeclaredValue<longhands::${property.ident}::SpecifiedValue>) % endif { if let DeclaredValue::WithVariables(ref with_variables) = *value { @@ -404,13 +404,13 @@ impl PropertyDeclarationIdSet { url_data: &UrlExtraData, from_shorthand: Option<ShorthandId>, custom_properties: &Option<Arc<::custom_properties::ComputedValuesMap>>, - f: F, + f: &mut F, error_reporter: &ParseErrorReporter, quirks_mode: QuirksMode) % if property.boxed: - where F: FnOnce(&DeclaredValue<Box<longhands::${property.ident}::SpecifiedValue>>) + where F: FnMut(&DeclaredValue<Box<longhands::${property.ident}::SpecifiedValue>>) % else: - where F: FnOnce(&DeclaredValue<longhands::${property.ident}::SpecifiedValue>) + where F: FnMut(&DeclaredValue<longhands::${property.ident}::SpecifiedValue>) % endif { f(& |