Skip to content

Commit e1d3c1e

Browse files
committed
refactor: fix style
1 parent 30e6e85 commit e1d3c1e

File tree

1 file changed

+10
-9
lines changed

1 file changed

+10
-9
lines changed

clippy_lints/src/permissions_set_readonly_false.rs

+10-9
Original file line numberDiff line numberDiff line change
@@ -34,15 +34,16 @@ impl<'tcx> LateLintPass<'tcx> for PermissionsSetReadonlyFalse {
3434
&& match_type(cx, cx.typeck_results().expr_ty(receiver), &paths::PERMISSIONS)
3535
&& path.ident.name == sym!(set_readonly)
3636
&& let ExprKind::Lit(lit) = &arg.kind
37-
&& LitKind::Bool(false) == lit.node {
38-
span_lint_and_note(
39-
cx,
40-
PERMISSIONS_SET_READONLY_FALSE,
41-
expr.span,
42-
"call to `set_readonly` with argument `false`",
43-
None,
44-
"on Unix platforms this results in the file being world writable",
45-
);
37+
&& LitKind::Bool(false) == lit.node
38+
{
39+
span_lint_and_note(
40+
cx,
41+
PERMISSIONS_SET_READONLY_FALSE,
42+
expr.span,
43+
"call to `set_readonly` with argument `false`",
44+
None,
45+
"on Unix platforms this results in the file being world writable",
46+
);
4647
}
4748
}
4849
}

0 commit comments

Comments
 (0)