Rust

Rust

Made by DeepSource

Found consecutive if expressions with the same condition RS-W1009

Bug risk
Minor

Consecutive if statements with the same condition are probably the result of a copy-paste. This checker ignores function calls as they could have side-effects.

Consider revisiting the if condition.

Bad practice

if x == 42 {
    /* ... */
} else if x == 42 { 
    /* ... */
}