diff options
author | Oriol Brufau <obrufau@igalia.com> | 2024-01-25 10:03:31 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-01-25 09:03:31 +0000 |
commit | 50f56affe35a5565f99226daeb29843246c32b69 (patch) | |
tree | 23a027edebdc2aae64bb37b4ecfd0f48639fa08c /components/layout_2020/table/mod.rs | |
parent | 886f6c58d4cd149fe3238d668bd2f9fd5db78071 (diff) | |
download | servo-50f56affe35a5565f99226daeb29843246c32b69.tar.gz servo-50f56affe35a5565f99226daeb29843246c32b69.zip |
Lint layout_2020 with clippy (#31169)
cargo clippy --fix -p layout_2020 --allow-dirty --broken-code
Diffstat (limited to 'components/layout_2020/table/mod.rs')
-rw-r--r-- | components/layout_2020/table/mod.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/components/layout_2020/table/mod.rs b/components/layout_2020/table/mod.rs index ec874f20b98..d91137ec6af 100644 --- a/components/layout_2020/table/mod.rs +++ b/components/layout_2020/table/mod.rs @@ -50,7 +50,7 @@ impl Table { /// Return the slot at the given coordinates, if it exists in the table, otherwise /// return None. - fn get_slot<'a>(&'a self, coords: TableSlotCoordinates) -> Option<&'a TableSlot> { + fn get_slot(&self, coords: TableSlotCoordinates) -> Option<&TableSlot> { self.slots.get(coords.y)?.get(coords.x) } @@ -60,8 +60,8 @@ impl Table { ) -> Option<TableSlotCoordinates> { match self.get_slot(coords) { Some(&TableSlot::Cell(_)) => Some(coords), - Some(&TableSlot::Spanned(ref offsets)) => Some(coords - offsets[0]), - _ => return None, + Some(TableSlot::Spanned(offsets)) => Some(coords - offsets[0]), + _ => None, } } @@ -73,7 +73,7 @@ impl Table { let slot = self.get_slot(resolved_coords); match slot { - Some(&TableSlot::Cell(ref cell)) => Some(cell), + Some(TableSlot::Cell(cell)) => Some(cell), _ => unreachable!( "Spanned slot should not point to an empty cell or another spanned slot." ), |