Merge some lints together #1078
Labels
A-documentation
Area: Adding or improving documentation
C-enhancement
Category: Enhancement of lints, like adding more cases or adding help messages
S-needs-discussion
Status: Needs further discussion before merging or work can be started
Milestone
Clippy has a lot of lints now, but sometimes there is not much difference between two lints. I think we should merge some of them together.
Advantages
new_without_default
andnew_without_default_derive
).Option::unwrap
but notResult::unwrap
?Disadvantages
rustc
has a way to indicate a lint was renamed (and hopefully handle properly#[allow]
s etc. on it).Candidates
Here are some candidates (there might be other):
block_in_if_condition_expr
andblock_in_if_condition_stmt
→ rename them both toblock_in_if_condition
;option_map_unwrap_or
andoption_map_unwrap_or_else
→option_map_unwrap
;result_unwrap_used
andoption_unwrap_used
→unwrap_used
;for_loop_over_option
andfor_loop_over_result
→ ?new_without_default
andnew_without_default_derive
→new_without_default
(the only difference is how the suggestion is built);string_add
andstring_add_assign
→string_add
;identity_op
andmodulo_one
→useless_arithmetic
The text was updated successfully, but these errors were encountered: