style: Rustfmt servo/. r=zrhoffman

$ find servo -name '*.rs' | xargs rustup run nightly rustfmt

Depends on D179380

Differential Revision: https://phabricator.services.mozilla.com/D179381
This commit is contained in:
Emilio Cobos Álvarez 2023-05-30 08:04:52 +00:00 committed by Martin Robinson
parent 68cbe6833d
commit ad72081ac8
70 changed files with 665 additions and 448 deletions

View file

@ -402,7 +402,9 @@ where
);
if invalidated_sibling {
sibling_invalidator.processor.invalidated_sibling(sibling, self.element);
sibling_invalidator
.processor
.invalidated_sibling(sibling, self.element);
}
any_invalidated |= invalidated_sibling;

View file

@ -143,7 +143,11 @@ impl RestyleHint {
/// be replaced.
#[inline]
pub fn has_animation_hint_or_recascade(&self) -> bool {
self.intersects(Self::for_animations() | Self::RECASCADE_SELF | Self::RECASCADE_SELF_IF_INHERIT_RESET_STYLE)
self.intersects(
Self::for_animations() |
Self::RECASCADE_SELF |
Self::RECASCADE_SELF_IF_INHERIT_RESET_STYLE,
)
}
/// Returns whether the hint specifies some restyle work other than an

View file

@ -136,7 +136,11 @@ where
return;
}
}
debug_assert!(false, "Should've found {:?} as an ancestor of {:?}", ancestor, child);
debug_assert!(
false,
"Should've found {:?} as an ancestor of {:?}",
ancestor, child
);
}
/// Propagates the bits after invalidating a descendant child, if needed.
@ -169,13 +173,20 @@ pub fn invalidated_sibling<E>(element: E, of: E)
where
E: TElement,
{
debug_assert_eq!(element.as_node().parent_node(), of.as_node().parent_node(), "Should be siblings");
debug_assert_eq!(
element.as_node().parent_node(),
of.as_node().parent_node(),
"Should be siblings"
);
if !invalidated_self(element) {
return;
}
if element.traversal_parent() != of.traversal_parent() {
let parent = element.as_node().parent_element_or_host();
debug_assert!(parent.is_some(), "How can we have siblings without parent nodes?");
debug_assert!(
parent.is_some(),
"How can we have siblings without parent nodes?"
);
if let Some(e) = parent {
propagate_dirty_bit_up_to(e, element)
}