Rust

Rust

Made by DeepSource

Comparing unit values RS-E1016

Bug risk
Major

The unit value is always equal to itself. Comparisons against the unit value are probably the result of accidental semicolons.

Bad practice

if { foo(); } == { bar(); } {}

Recommended

let f = foo();
let b = bar();
if f == b {}