Replace calls to ".filter_map()" followed by ".next()" with ".find_map()" (#40612)

The two are semantically equivalent, but `find_map` is more concise.

Testing: Covered by existing tests

Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
This commit is contained in:
Simon Wülker
2025-11-13 15:53:57 +01:00
committed by GitHub
parent a6cc0ec0fe
commit a1269e809d
15 changed files with 57 additions and 105 deletions

View File

@@ -367,8 +367,7 @@ impl VirtualMethods for HTMLOptionElement {
if let Some(select) = context
.parent
.inclusive_ancestors(ShadowIncluding::No)
.filter_map(DomRoot::downcast::<HTMLSelectElement>)
.next()
.find_map(DomRoot::downcast::<HTMLSelectElement>)
{
select
.validity_state(can_gc)