Lint idea: Bind if/else returning bool and then using that binding to conditionally do something #4311
Labels
A-lint
Area: New lints
L-complexity
Lint: Belongs in the complexity lint group
L-suggestion
Lint: Improving, adding or fixing lint suggestions
Lint idea:
Can be rewritten as
or
What to keep in mind when implementing this:
if
andif let
: Suggest rewriting it as oneif
in the first case and as amatch
in the second*.if/else
blocks returningtrue/false
, without doing anything else inside?cc #4308
single_match_else
lint, but this is a pedantic lint, so we can ignore thisThe text was updated successfully, but these errors were encountered: