From 7bcc288cd92364ccec376383cdc9d3e56f7e556f Mon Sep 17 00:00:00 2001 From: Taym Haddadi Date: Mon, 7 Oct 2024 19:21:26 +0100 Subject: [PATCH] layout: Avoid double negation in `CellLayout::is_empty_for_empty_cells()` (#33688) * Avoid double negation in is_empty_for_empty_cells() Signed-off-by: Taym * Remove more negation Signed-off-by: Taym * Fix format Signed-off-by: Taym --------- Signed-off-by: Taym --- components/layout_2020/table/layout.rs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/components/layout_2020/table/layout.rs b/components/layout_2020/table/layout.rs index a056f632118..c14432856fa 100644 --- a/components/layout_2020/table/layout.rs +++ b/components/layout_2020/table/layout.rs @@ -74,11 +74,10 @@ impl CellLayout { /// Whether the cell is considered empty for the purpose of the 'empty-cells' property. fn is_empty_for_empty_cells(&self) -> bool { - !self - .layout + self.layout .fragments .iter() - .any(|fragment| !matches!(fragment, Fragment::AbsoluteOrFixedPositioned(_))) + .all(|fragment| matches!(fragment, Fragment::AbsoluteOrFixedPositioned(_))) } }