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 <haddadi.taym@gmail.com>

* Remove more negation

Signed-off-by: Taym <haddadi.taym@gmail.com>

* Fix format

Signed-off-by: Taym <haddadi.taym@gmail.com>

---------

Signed-off-by: Taym <haddadi.taym@gmail.com>
This commit is contained in:
Taym Haddadi 2024-10-07 19:21:26 +01:00 committed by GitHub
parent 628ca03a80
commit 7bcc288cd9
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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(_)))
}
}