about summary refs log tree commit diff
path: root/clippy_lints/src/mutable_debug_assertion.rs
diff options
context:
space:
mode:
authorPhilipp Krones <hello@philkrones.com>2025-04-22 16:10:59 +0200
committerPhilipp Krones <hello@philkrones.com>2025-04-22 18:24:43 +0200
commitff428d91c2b690b8dbd8cc1e48274870c24fe1e2 (patch)
tree496897def77d0f71b6db9713a16c2ea4f5886f23 /clippy_lints/src/mutable_debug_assertion.rs
parented892e72dd05c6dbbd425343f84d1c1d348a898d (diff)
Merge commit '0621446356e20fd2ead13a6763bb936c95eb0cfa' into clippy-subtree-update
Diffstat (limited to 'clippy_lints/src/mutable_debug_assertion.rs')
-rw-r--r--clippy_lints/src/mutable_debug_assertion.rs11
1 files changed, 5 insertions, 6 deletions
diff --git a/clippy_lints/src/mutable_debug_assertion.rs b/clippy_lints/src/mutable_debug_assertion.rs
index 13a23a13b9c..270eebe0758 100644
--- a/clippy_lints/src/mutable_debug_assertion.rs
+++ b/clippy_lints/src/mutable_debug_assertion.rs
@@ -101,14 +101,13 @@ impl<'tcx> Visitor<'tcx> for MutArgVisitor<'_, 'tcx> {
                 return;
             },
             ExprKind::Path(_) => {
-                if let Some(adj) = self.cx.typeck_results().adjustments().get(expr.hir_id) {
-                    if adj
+                if let Some(adj) = self.cx.typeck_results().adjustments().get(expr.hir_id)
+                    && adj
                         .iter()
                         .any(|a| matches!(a.target.kind(), ty::Ref(_, _, Mutability::Mut)))
-                    {
-                        self.found = true;
-                        return;
-                    }
+                {
+                    self.found = true;
+                    return;
                 }
             },
             // Don't check await desugars