Open
Description
I have some code that looks like this.
let ok = true;
if check1() {
// Log some info.
ok = false;
}
if check2() {
// Log some info.
ok = false;
}
if check3() {
// Log some info.
ok = false;
}
However clippy gives me a useless_let_if_seq
saying that I should merge the first if into the let
. I don't think this is a helpful suggestion because 1) It makes the first check look special and 2) it distracts a bit from the true
until marked false
.
After thinking about this a bit I think that if the variable defined from the let
is set from multiple locations in the code then this warning should probably be suppressed.