aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/htmlcollection.rs
diff options
context:
space:
mode:
authorSimon Wülker <simon.wuelker@arcor.de>2024-09-16 12:03:52 +0200
committerGitHub <noreply@github.com>2024-09-16 10:03:52 +0000
commit7df30f3788a14baa590c9123f5e1616ccfe0a0f0 (patch)
tree491bdb4447ec1a24c66d1ad91f7c1678ee71b9e1 /components/script/dom/htmlcollection.rs
parent236cae9ce53019036710032a980966542a64fbce (diff)
downloadservo-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/htmlcollection.rs')
-rw-r--r--components/script/dom/htmlcollection.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/components/script/dom/htmlcollection.rs b/components/script/dom/htmlcollection.rs
index b2a135ace00..6a60e0f42af 100644
--- a/components/script/dom/htmlcollection.rs
+++ b/components/script/dom/htmlcollection.rs
@@ -383,8 +383,8 @@ impl HTMLCollectionMethods for HTMLCollection {
// Step 2.
self.elements_iter().find(|elem| {
- elem.get_id().map_or(false, |id| id == key) ||
- (elem.namespace() == &ns!(html) && elem.get_name().map_or(false, |id| id == key))
+ elem.get_id().is_some_and(|id| id == key) ||
+ (elem.namespace() == &ns!(html) && elem.get_name().is_some_and(|id| id == key))
})
}