Skip to content

equatable_if_let

Source Code

What it does

Checks for if let pattern matching that can be replaced by a simple comparison.

Example

cairo
if let Some(2) = a {
    // Code
}

Could be replaced by

cairo
if a == Some(2) {
    // Code
}