RS.CLIPPY.SHORT_CIRCUIT_STATEMENT
Using a short circuit boolean condition as a statement
This checker is a Clippy lint created by The Rust Project Contributors. The documentation shown here is a copy of the original documentation for: short_circuit_statement. Copyright ©2025 The Rust Team. All rights reserved.
What it does
Checks for the use of short circuit boolean conditions as a statement.
Why is this bad?
Using a short circuit boolean condition as a statement may hide the fact that the second part is executed or not depending on the outcome of the first part.
Example
f() && g(); // We should write `if f() { g(); }`.