RS.CLIPPY.BOOL_ASSERT_COMPARISON
Using a boolean as comparison value in an assert_* macro when there is no need
This checker is a Clippy lint created by The Rust Project Contributors. The documentation shown here is a copy of the original documentation for: bool_assert_comparison. Copyright ©2025 The Rust Team. All rights reserved.
What it does
This lint warns about boolean comparisons in assert-like macros.
Why is this bad?
It is shorter to use the equivalent.
Example
assert_eq!("a".is_empty(), false);
assert_ne!("a".is_empty(), true);
Use instead:
assert!(!"a".is_empty());