mirror of
https://github.com/servo/servo.git
synced 2025-08-06 22:15:33 +01:00
style: Use Option::as_deref() in style code.
And drive-by simplify another function that was only doing Option::clone(). Differential Revision: https://phabricator.services.mozilla.com/D92839
This commit is contained in:
parent
379fb984f1
commit
384fd59ad0
4 changed files with 10 additions and 16 deletions
|
@ -351,10 +351,7 @@ where
|
|||
rule_inclusion,
|
||||
PseudoElementResolution::IfApplicable,
|
||||
)
|
||||
.resolve_primary_style(
|
||||
style.as_ref().map(|s| &**s),
|
||||
layout_parent_style.as_ref().map(|s| &**s),
|
||||
);
|
||||
.resolve_primary_style(style.as_deref(), layout_parent_style.as_deref());
|
||||
|
||||
let is_display_contents = primary_style.style().is_display_contents();
|
||||
|
||||
|
@ -373,10 +370,7 @@ where
|
|||
rule_inclusion,
|
||||
PseudoElementResolution::Force,
|
||||
)
|
||||
.resolve_style(
|
||||
style.as_ref().map(|s| &**s),
|
||||
layout_parent_style.as_ref().map(|s| &**s),
|
||||
)
|
||||
.resolve_style(style.as_deref(), layout_parent_style.as_deref())
|
||||
.into()
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue