diff options
author | bors-servo <lbergstrom+bors@mozilla.com> | 2016-01-03 09:16:34 +0530 |
---|---|---|
committer | bors-servo <lbergstrom+bors@mozilla.com> | 2016-01-03 09:16:34 +0530 |
commit | 9da739acefc7d1776bf727c8bf782eb79f241028 (patch) | |
tree | f0a67b0f04751ccc0cf990930af11a7e83b27d60 /components/script/dom/htmlcollection.rs | |
parent | 6844adbe2dd2730cbc13df0a78736386501cad02 (diff) | |
parent | 6b215f38eefc98853244c2ec6f4187ae6f000417 (diff) | |
download | servo-9da739acefc7d1776bf727c8bf782eb79f241028.tar.gz servo-9da739acefc7d1776bf727c8bf782eb79f241028.zip |
Auto merge of #9123 - karyon:clippy_cleanup, r=Manishearth
Fix a bunch of clippy lints
This fixes about 130 clippy lints. Let me know if i should split up the commit.
I wasn't sure about some of the changes, especially map_or instead of map(...).unwrap_or(...) and if let instead of single arm match were not always a strict improvement in my opinion, but i'll leave that decision to the reviewer :)
There are about 150 lints left which i thought were clippy bugs or i didn't know how to fix.
cc @Manishearth
<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/9123)
<!-- Reviewable:end -->
Diffstat (limited to 'components/script/dom/htmlcollection.rs')
-rw-r--r-- | components/script/dom/htmlcollection.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/components/script/dom/htmlcollection.rs b/components/script/dom/htmlcollection.rs index 9eb375dc89b..1e80481ac68 100644 --- a/components/script/dom/htmlcollection.rs +++ b/components/script/dom/htmlcollection.rs @@ -287,8 +287,8 @@ impl<'a> Iterator for HTMLCollectionElementsIter<'a> { type Item = Root<Element>; fn next(&mut self) -> Option<Self::Item> { - let ref filter = self.filter; - let ref root = self.root; + let filter = &self.filter; + let root = &self.root; self.node_iter.by_ref() .filter_map(Root::downcast) .filter(|element| filter.filter(&element, root)) @@ -306,8 +306,8 @@ impl<'a> Iterator for HTMLCollectionElementsRevIter<'a> { type Item = Root<Element>; fn next(&mut self) -> Option<Self::Item> { - let ref filter = self.filter; - let ref root = self.root; + let filter = &self.filter; + let root = &self.root; self.node_iter.by_ref() .filter_map(Root::downcast) .filter(|element| filter.filter(&element, root)) |