mirror of
https://github.com/servo/servo.git
synced 2025-08-17 11:25:35 +01:00
Pass some 48-bytes closures by references instead of by value.
This commit is contained in:
parent
ed5485ed18
commit
837cb6ddb2
3 changed files with 8 additions and 8 deletions
|
@ -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(&
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue