about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--clippy_lints/src/permissions_set_readonly_false.rs19
1 files changed, 10 insertions, 9 deletions
diff --git a/clippy_lints/src/permissions_set_readonly_false.rs b/clippy_lints/src/permissions_set_readonly_false.rs
index 7d787ea4a4c..6c463bd8fce 100644
--- a/clippy_lints/src/permissions_set_readonly_false.rs
+++ b/clippy_lints/src/permissions_set_readonly_false.rs
@@ -34,15 +34,16 @@ impl<'tcx> LateLintPass<'tcx> for PermissionsSetReadonlyFalse {
             && match_type(cx, cx.typeck_results().expr_ty(receiver), &paths::PERMISSIONS)
                 && path.ident.name == sym!(set_readonly)
                 && let ExprKind::Lit(lit) = &arg.kind
-                && LitKind::Bool(false) == lit.node {
-                    span_lint_and_note(
-                        cx,
-                        PERMISSIONS_SET_READONLY_FALSE,
-                        expr.span,
-                        "call to `set_readonly` with argument `false`",
-                        None,
-                        "on Unix platforms this results in the file being world writable",
-                    );
+                && LitKind::Bool(false) == lit.node
+        {
+                span_lint_and_note(
+                    cx,
+                    PERMISSIONS_SET_READONLY_FALSE,
+                    expr.span,
+                    "call to `set_readonly` with argument `false`",
+                    None,
+                    "on Unix platforms this results in the file being world writable",
+                );
         }
     }
 }