RS.CLIPPY.NONMINIMAL_BOOL
Boolean expressions that can be written more concisely
This checker is a Clippy lint created by The Rust Project Contributors. The documentation shown here is a copy of the original documentation for: nonminimal_bool. Copyright ©2025 The Rust Team. All rights reserved.
What it does
Checks for boolean expressions that can be written more concisely.
Why is this bad?
Readability of boolean expressions suffers from unnecessary duplication.
Known problems
Ignores short circuiting behavior of || and
&&. Ignores |, & and ^.
Example
if a && true {}
if !(a == b) {}
Use instead:
if a {}
if a != b {}