mirror of
https://github.com/servo/servo.git
synced 2025-08-02 04:00:32 +01:00
style: Use a more compact form for should_process_descendants.
This commit is contained in:
parent
5b7d9eb94a
commit
a69d229615
2 changed files with 7 additions and 10 deletions
|
@ -81,11 +81,10 @@ impl<'a, E: TElement> InvalidationProcessor<'a, E> for DocumentStateInvalidation
|
|||
}
|
||||
|
||||
fn should_process_descendants(&mut self, element: E) -> bool {
|
||||
let data = match element.borrow_data() {
|
||||
Some(d) => d,
|
||||
None => return false,
|
||||
};
|
||||
state_and_attributes::should_process_descendants(&data)
|
||||
match element.borrow_data() {
|
||||
Some(d) => state_and_attributes::should_process_descendants(&d),
|
||||
None => false,
|
||||
}
|
||||
}
|
||||
|
||||
fn invalidated_descendants(&mut self, element: E, child: E) {
|
||||
|
|
|
@ -298,12 +298,10 @@ where
|
|||
return should_process_descendants(&self.data)
|
||||
}
|
||||
|
||||
let data = match element.borrow_data() {
|
||||
Some(d) => d,
|
||||
match element.borrow_data() {
|
||||
Some(d) => should_process_descendants(&d),
|
||||
None => return false,
|
||||
};
|
||||
|
||||
should_process_descendants(&data)
|
||||
}
|
||||
}
|
||||
|
||||
fn recursion_limit_exceeded(&mut self, element: E) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue