You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: clippy_lints/src/needless_bool.rs
+18-8Lines changed: 18 additions & 8 deletions
Original file line number
Diff line number
Diff line change
@@ -7,6 +7,7 @@ use rustc::hir::*;
7
7
use syntax::ast::LitKind;
8
8
use syntax::codemap::Spanned;
9
9
use utils::{span_lint, span_lint_and_then, snippet, snippet_opt};
10
+
use utils::sugg::Sugg;
10
11
11
12
/// **What it does:** This lint checks for expressions of the form `if c { true } else { false }` (or vice versa) and suggest using the condition directly.
12
13
///
@@ -49,11 +50,20 @@ impl LateLintPass for NeedlessBool {
0 commit comments