mirror of
https://github.com/servo/servo
synced 2026-05-01 03:47:53 +02:00
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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user