Matching over booleanRS-C1011
Matching over a boolean expression is less readable than using an if-else
block.
Replace the match
block with an if-else
block.
Bad practice
match condition {
true => foo(),
false => bar(),
}
Recommended
if condition {
foo()
} else {
bar()
}