diff options
author | Simon Wülker <simon.wuelker@arcor.de> | 2024-09-16 12:03:52 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-09-16 10:03:52 +0000 |
commit | 7df30f3788a14baa590c9123f5e1616ccfe0a0f0 (patch) | |
tree | 491bdb4447ec1a24c66d1ad91f7c1678ee71b9e1 /components/script/dom/htmlformcontrolscollection.rs | |
parent | 236cae9ce53019036710032a980966542a64fbce (diff) | |
download | servo-7df30f3788a14baa590c9123f5e1616ccfe0a0f0.tar.gz servo-7df30f3788a14baa590c9123f5e1616ccfe0a0f0.zip |
Replace .map_or(false with Option::is_some_and (#33468)
Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
Diffstat (limited to 'components/script/dom/htmlformcontrolscollection.rs')
-rw-r--r-- | components/script/dom/htmlformcontrolscollection.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/components/script/dom/htmlformcontrolscollection.rs b/components/script/dom/htmlformcontrolscollection.rs index d02ff962213..66e37145e71 100644 --- a/components/script/dom/htmlformcontrolscollection.rs +++ b/components/script/dom/htmlformcontrolscollection.rs @@ -70,8 +70,8 @@ impl HTMLFormControlsCollectionMethods for HTMLFormControlsCollection { let name = Atom::from(name); let mut filter_map = self.collection.elements_iter().filter_map(|elem| { - if elem.get_name().map_or(false, |n| n == name) || - elem.get_id().map_or(false, |i| i == name) + if elem.get_name().is_some_and(|n| n == name) || + elem.get_id().is_some_and(|i| i == name) { Some(elem) } else { |