diff options
author | komuhangi <51232461+jahielkomu@users.noreply.github.com> | 2024-04-19 11:48:01 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-04-19 08:48:01 +0000 |
commit | 007a72fe4de1901feec920e7ca995bbe8f56ef48 (patch) | |
tree | b91cb5d2ca461554852968fbe36eb5684585ade4 /components/script/dom/nodelist.rs | |
parent | f70413baba624751c76df97d269bdb9fa0bf3495 (diff) | |
download | servo-007a72fe4de1901feec920e7ca995bbe8f56ef48.tar.gz servo-007a72fe4de1901feec920e7ca995bbe8f56ef48.zip |
Fixed some clippy warnings in components (#32107)
* Fixed some clippy warnings in components
* Updated handling of NaN values in comparison
* Updated formatting using ./mach fmt
Diffstat (limited to 'components/script/dom/nodelist.rs')
-rw-r--r-- | components/script/dom/nodelist.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/components/script/dom/nodelist.rs b/components/script/dom/nodelist.rs index d54cb9a8b57..78e89640f7f 100644 --- a/components/script/dom/nodelist.rs +++ b/components/script/dom/nodelist.rs @@ -438,6 +438,6 @@ impl ElementsByNameList { pub fn item(&self, index: u32) -> Option<DomRoot<Node>> { self.document .nth_element_by_name(index, &self.name) - .and_then(|n| Some(DomRoot::from_ref(&*n))) + .map(|n| DomRoot::from_ref(&*n)) } } |