Description
As reported by @ada4a on #15801 both unnecessary_option_map_or_else
and unnecessary_result_map_or_else
have a two bespoke implementations to identify identity closures.
clippy_utils
have is_expr_identity_function
which is probably a better option to use.
Similarly, both lint implementations are similar enough that they should be merged into one.
Version
Additional Labels
@rustbot claim
@rustbot label C-enhancement