rust-lang/rust-clippy

`bool_comparison` should not fire when testing for false

Open

#1,043 建立於 2016年6月26日

在 GitHub 查看
 (4 留言) (2 反應) (0 負責人)Rust (1,391 fork)batch import
A-lintL-styleS-needs-discussiongood first issue

倉庫指標

Star
 (10,406 star)
PR 合併指標
 (平均合併 19天 22小時) (30 天內合併 113 個 PR)

描述

I think that the bool_comparison lint should not fire when the comparison is var == false because, at least I, find that version much easier to see when quickly scrolling through the code than the !var as it is too simple to miss that single !. However, I'm just putting this here for discussion I'll go turn the lint off in that specific place.

Enjoy your rusty endeavors.

貢獻者指南