mirror of
https://github.com/servo/servo.git
synced 2025-06-06 16:45:39 +00:00
Replace .map_or(false with Option::is_some_and (#33468)
Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
This commit is contained in:
parent
236cae9ce5
commit
7df30f3788
51 changed files with 165 additions and 171 deletions
|
@ -868,7 +868,7 @@ impl Fragment {
|
|||
node_address == self.node ||
|
||||
self.inline_context
|
||||
.as_ref()
|
||||
.map_or(false, |ctx| ctx.contains_node(node_address))
|
||||
.is_some_and(|ctx| ctx.contains_node(node_address))
|
||||
}
|
||||
|
||||
/// Adds a style to the inline context for this fragment. If the inline context doesn't exist
|
||||
|
@ -2750,9 +2750,7 @@ impl Fragment {
|
|||
/// Returns true if this fragment has a transform applied that causes it to take up no space.
|
||||
pub fn has_non_invertible_transform_or_zero_scale(&self) -> bool {
|
||||
self.transform_matrix(&Rect::default())
|
||||
.map_or(false, |matrix| {
|
||||
!matrix.is_invertible() || matrix.m11 == 0. || matrix.m22 == 0.
|
||||
})
|
||||
.is_some_and(|matrix| !matrix.is_invertible() || matrix.m11 == 0. || matrix.m22 == 0.)
|
||||
}
|
||||
|
||||
/// Returns true if this fragment establishes a new stacking context and false otherwise.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue