Code readability and Clippy
⚓ Rust 📅 2026-01-20 👤 surdeus 👁️ 9One my student from Poland taught me to use the style of a negation, however Clippy doesn't like it:
66 | if session.is_empty() == false {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `!session.is_empty()`
The reason is Unnecessary code.. However ! is hardly visible and a source of mistakes. Do you agree that Clippy suggestion reduces a readability of the code?
3 posts - 3 participants
🏷️ Rust_feed