Commit graph

12 commits

Author SHA1 Message Date
Samuel E. Moelius III
032f112745 Fix adjacent code 2022-08-16 18:34:51 -04:00
Max Baumann
9be3945be7 fix existing clippy tests 2022-03-30 20:12:58 +02:00
Yoshitomo Nakanishi
9f6f001988 same_item_push: Don't trigger same_item_push if the vec is used in the loop body 2021-04-02 16:28:16 +09:00
Takayuki Nakata
952c04674e Refactoring: tests in same_item_push 2020-09-08 23:03:15 +09:00
Takayuki Nakata
2c9f82e7d2 Add some tests to same_item_push
Add tests in which the variable is initialized with a match expression and function call
2020-09-08 22:45:27 +09:00
Takayuki Nakata
3d30ef7818 Restrict same_item_push to suppress false positives
It emits a lint when the pushed item is a literal, a constant and an immutable binding that are initialized with those.
2020-09-07 23:46:43 +09:00
Takayuki Nakata
96b31a5b36 Fix FP when coercion kicks in 2020-09-06 00:02:35 +09:00
Takayuki Nakata
aa7ffa5257 Fix FP in same_item_push
Don't emit a lint when the pushed item doesn't have Clone trait
2020-09-01 22:39:09 +09:00
Takayuki Nakata
f98ffa271d Fix FP for same_item_push
Don't emit a lint when `pushed_item` was declared as mutable variable.
2020-08-14 22:54:12 +09:00
Takayuki Nakata
b7ceb4d3d7 rustfmt 2020-08-05 23:00:03 +09:00
Takayuki Nakata
161f475100 Add test case for same_item_push 2020-08-05 22:51:38 +09:00
Takayuki Nakata
1e8ada3cab Add lint same_item_push 2020-08-05 22:51:38 +09:00