mirror of
https://github.com/servo/servo.git
synced 2025-08-03 12:40:06 +01:00
Auto merge of #15827 - moonlightdrive:use-iflet-not-match, r=mbrubeck
replace match with if let <!-- Please describe your changes on the following line: --> Use `if let` instead of a `match` with a single pattern. I'm not clear if/how this needs to be tested (beyond what's been checked-off below), so please let me know if there's more to do. Thanks! --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: --> - [X] `./mach build -d` does not report any errors - [X] `./mach test-tidy` does not report any errors - [X] These changes fix #15810 <!-- Either: --> - [ ] There are tests for these changes OR - [ ] These changes do not require tests because _____ <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. --> <!-- 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/15827) <!-- Reviewable:end -->
This commit is contained in:
commit
5ccf79e055
1 changed files with 4 additions and 7 deletions
|
@ -1802,13 +1802,10 @@ pub fn apply_declarations<'a, F, I>(viewport_size: Size2D<Au>,
|
|||
let mut custom_properties = None;
|
||||
let mut seen_custom = HashSet::new();
|
||||
for declaration in iter_declarations() {
|
||||
match *declaration {
|
||||
PropertyDeclaration::Custom(ref name, ref value) => {
|
||||
::custom_properties::cascade(
|
||||
&mut custom_properties, &inherited_custom_properties,
|
||||
&mut seen_custom, name, value)
|
||||
}
|
||||
_ => {}
|
||||
if let PropertyDeclaration::Custom(ref name, ref value) = *declaration {
|
||||
::custom_properties::cascade(
|
||||
&mut custom_properties, &inherited_custom_properties,
|
||||
&mut seen_custom, name, value)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue