Philipp Krones
0ae4a048c6
Merge commit '9725c4a162502a02c1c67fdca6b797fe09b2b73c' into clippy-subtree-update
2024-04-04 19:52:55 +02:00
Philipp Krones
0e62b18435
Merge commit '9d6f41691ed9dbfaec2a2df2661c42451f2fe0d3' into clippy-subtree-update
2024-03-21 22:20:40 +01:00
Philipp Krones
798865c593
Merge commit '66c29b973b3b10278bd39f4e26b08522a379c2c9' into clippy-subtree-update
2024-01-25 19:17:36 +01:00
Philipp Krones
aa220c7ee7
Merge commit '26ac6aab023393c94edf42f38f6ad31196009643'
2024-01-11 17:27:03 +01:00
Philipp Krones
cc61aeea54
Merge commit '080b587854a73f2a8cbaecff1884860a78e2ff37' into clippyup
2023-08-24 21:32:12 +02:00
Philipp Krones
cb3ecf7b79
Merge commit '37f4c1725d3fd7e9c3ffd8783246bc5589debc53' into clippyup
2023-07-02 14:59:02 +02:00
Philipp Krones
a1b75c5108
Merge commit 'a3ed905928a03b6e433d0b429190bf3a847128b3' into clippyup
2023-04-23 13:28:56 +02:00
flip1995
5cf4984872
Merge commit 'b7f3f7f6082679da2da9a0b3faf1b5adef3afd3b' into clippyup
2021-10-07 11:21:30 +02:00
flip1995
d3d2018ead
Merge commit '3e7c6dec244539970b593824334876f8b6ed0b18' into clippyup
2020-11-23 13:51:04 +01:00
Eduardo Broto
806d973adc
map_clone: avoid suggesting copied()
for &mut
2020-04-25 22:52:19 +02:00
Michael Wright
b15b977d76
Fix map_clone
false positive
...
Don't lint when the item type is not a reference. `copied` only applies
to references.
2019-12-22 11:26:51 +02:00
Shotaro Yamada
555f5a49a2
Test fixes
2019-10-03 08:10:29 +09:00
flip1995
08d2a0d6b2
Also rename the lint in test files
2019-05-16 20:18:07 +02:00
Michael Wright
4fcaab3d62
Split redundant_closure lint
...
Move the method checking into a new lint called
`redundant_closures_for_method_calls` and put it in the pedantic group.
This aspect of the lint seems more controversial than the rest.
cc #3942
2019-05-16 08:25:39 +02:00
Manish Goregaokar
770de14505
Suggest .copied() for map_clone on iterators too
2019-04-28 11:14:39 -07:00
Manish Goregaokar
e9cde416ba
Only suggest .copied() for Option right now
2019-04-15 15:44:09 -07:00
Manish Goregaokar
ad2c65bd1b
Also suggest .copied() when .clone() is called on a Copy type
2019-04-15 14:39:41 -07:00
Manish Goregaokar
d2f7ae70ae
Suggest .copied() instead of .cloned() in map_clone when dealing with references
2019-04-15 14:32:39 -07:00
Grzegorz
16881390e1
removing redundant closures in the whole project
2019-02-10 13:35:44 +01:00
Michael Wright
f53f12b0c3
Fix issue number in map_clone
test
2019-01-15 08:17:55 +02:00
Michael Wright
67a9f20c91
Fix map_clone
bad suggestion
...
`cloned` requires that the elements of the iterator must be references. This
change determines if that is the case by examining the type of the closure
argument and suggesting `.cloned` only if it is a reference. When the closure
argument is not a reference, it suggests removing the `map` call instead.
A minor problem with this change is that the new check sometimes overlaps
with the `clone_on_copy` lint.
Fixes #498
2019-01-15 08:09:47 +02:00
Wilco Kusee
9ff821a7e8
Add run-rustfix to map_clone test
2019-01-13 13:10:25 +01:00