collapsible_if
What it does
Checks for nested if
statements that can be collapsed into a single if
statement.
Example
cairo
fn main() {
let x = true;
let y = true;
let z = false;
if x || z {
if y && z {
println!("Hello");
}
}
}
Can be collapsed to
cairo
fn main() {
let x = true;
let y = true;
let z = false;
if (x || z) && (y && z) {
println!("Hello");
}
}