]> git.lizzy.rs Git - rust.git/commit
Auto merge of #7330 - xFrednet:0000-refactor-map-identity, r=flip1995
authorbors <bors@rust-lang.org>
Wed, 9 Jun 2021 08:27:05 +0000 (08:27 +0000)
committerbors <bors@rust-lang.org>
Wed, 9 Jun 2021 08:27:05 +0000 (08:27 +0000)
commitda0538eaca6be7f89d1734bd4a89fb3af97b0049
tree304fa60634612addf60492ea6127bfd992ab3b94
parent07217e3370868440b17d846dd4b156449ed62920
parent5336f88403aae270e1e8bbf0aee31707311c590f
Auto merge of #7330 - xFrednet:0000-refactor-map-identity, r=flip1995

Refactoring identity function lints

I've noticed that we have several lints that all check for identity functions and each used their own check implementation. I moved the `is_expr_identity_function` function to `clippy_utils` and adapted all lints to reuse that one function. This should make the addition of new lints like this also easier in the future.

I've also moved the `map_identity` lint into the `methods` module. It's probably the best to review this PR by checking each commit individually. And that's it, have a great day :upside_down_face:

changelog: none
clippy_utils/src/lib.rs