Rust

Rust

By DeepSource

Found binary operation with identical left and right hand sidesRS-E1008

Bug risk

Binary expressions with identical left and right hand side expressions are probably the result of a copy-paste. This checker ignores function calls as they could have side-effects.

Such expressions require an audit, consider revisiting this piece of code.

Examples

Bad Practice

if (a < b) || (a < b) {
    // ...
}