Skip to content

Commit f6a0437

Browse files
Centri3llogiq
andauthored
Update clippy_lints/src/casts/ptr_cast_constness.rs
Co-authored-by: llogiq <[email protected]>
1 parent c5a914b commit f6a0437

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

clippy_lints/src/casts/ptr_cast_constness.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@ pub(super) fn check(
2121
if msrv.meets(RustcVersion::new(1,65,0));
2222
if let ty::RawPtr(TypeAndMut { mutbl: from_mutbl, .. }) = cast_from.kind();
2323
if let ty::RawPtr(TypeAndMut { mutbl: to_mutbl, .. }) = cast_to.kind();
24-
if !matches!((from_mutbl, to_mutbl),
25-
(Mutability::Not, Mutability::Not) | (Mutability::Mut, Mutability::Mut));
24+
if matches!((from_mutbl, to_mutbl),
25+
(Mutability::Not, Mutability::Mut) | (Mutability::Mut, Mutability::Not));
2626
then {
2727
let sugg = Sugg::hir(cx, cast_expr, "_");
2828
let constness = match *to_mutbl {

0 commit comments

Comments
 (0)