Commit graph

12 commits

Author SHA1 Message Date
hkalbasi
388a3d0983 Implement equatable if let lint 2021-10-04 22:16:42 +03:30
Jason Newcomb
ee6a6b55c4
Change the suggestion for while_let_on_iterator when the iterator cannot be consumed to iter.by_ref() 2021-09-17 21:44:21 -04:00
Jason Newcomb
205aa88921
Fix while_let_on_iterator
When the iterator is one field within a local correctly check for usages of the field
2021-07-31 09:32:54 -04:00
Jason Newcomb
fe75faa6ee
Fix while_let_on_iterator
Reborrow mutable references rather then take a reference to them.
2021-07-31 00:11:46 -04:00
Jason Newcomb
7db0e4f791
Suggest &mut iter inside a closure for while_let_on_iterator 2021-05-21 12:27:40 -04:00
Jason Newcomb
cd0db8a459
Fix test comment for while_let_on_iterator 2021-05-12 21:51:23 -04:00
Jason Newcomb
4713e25ab0
Cleanup of while_let_on_iterator 2021-05-12 21:51:19 -04:00
Jason Newcomb
daca50a515
Improvements to while_let_on_iterator
* Suggest `&mut iter` when the iterator is used after the loop.
* Suggest `&mut iter` when the iterator is a field in a struct.
* Don't lint when the iterator is a field in a struct, and the struct is
used in the loop.
* Lint when the loop is nested in another loop, but suggest `&mut iter`
unless the iterator is from a local declared inside the loop.
2021-05-12 21:49:22 -04:00
mark
d2f0b27f0a clippy: stabilize or_patterns lint 2021-03-19 19:45:42 -05:00
flip1995
d13d8987b0 Merge commit '43a1777b89cf6791f9e20878b4e5e3ae907867a5' into clippyup 2020-05-11 20:23:47 +02:00
flip1995
a1826222cf
Add tests for #1654 2020-04-25 20:51:23 +02:00
flip1995
44511d5ee6
Update while_let_on_iterator tests 2020-04-25 20:11:15 +02:00