Suggestion to add a rule to help finding code that can be changed to use the short version of if let,
if let foo = foo {
bar(foo)
}
to:
I've used this in my .yml which does the trick for my code, but I'm sure it can be improved to cover more cases:
use_short_if_let:
name: "Use short if let"
regex: "if let (\\w*) = \\1(,| {)"
capture_group: 0
severity: warning
Suggestion to add a rule to help finding code that can be changed to use the short version of if let,
to:
I've used this in my .yml which does the trick for my code, but I'm sure it can be improved to cover more cases: