From dfc9c9132b7087252fde2734a9ba32013f246a7a Mon Sep 17 00:00:00 2001 From: Michael Goulet Date: Wed, 8 May 2024 13:10:50 -0400 Subject: [PATCH] Inline MemCategorization into ExprUseVisitor --- clippy_lints/src/operators/assign_op_pattern.rs | 4 ++-- clippy_lints/src/unwrap.rs | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/clippy_lints/src/operators/assign_op_pattern.rs b/clippy_lints/src/operators/assign_op_pattern.rs index 435eb9048f5..8effe6ab54d 100644 --- a/clippy_lints/src/operators/assign_op_pattern.rs +++ b/clippy_lints/src/operators/assign_op_pattern.rs @@ -120,7 +120,7 @@ fn copy(&mut self, _: &PlaceWithHirId<'_>, _: HirId) {} let mut s = S(HirIdSet::default()); let infcx = cx.tcx.infer_ctxt().build(); - let mut v = ExprUseVisitor::new( + let v = ExprUseVisitor::new( &mut s, &infcx, cx.tcx.hir().body_owner_def_id(cx.enclosing_body.unwrap()), @@ -152,7 +152,7 @@ fn copy(&mut self, _: &PlaceWithHirId<'_>, _: HirId) {} let mut s = S(HirIdSet::default()); let infcx = cx.tcx.infer_ctxt().build(); - let mut v = ExprUseVisitor::new( + let v = ExprUseVisitor::new( &mut s, &infcx, cx.tcx.hir().body_owner_def_id(cx.enclosing_body.unwrap()), diff --git a/clippy_lints/src/unwrap.rs b/clippy_lints/src/unwrap.rs index 2622abd59cb..6aec3dfa45c 100644 --- a/clippy_lints/src/unwrap.rs +++ b/clippy_lints/src/unwrap.rs @@ -253,7 +253,7 @@ fn visit_branch( }; let infcx = self.cx.tcx.infer_ctxt().build(); - let mut vis = ExprUseVisitor::new( + let vis = ExprUseVisitor::new( &mut delegate, &infcx, cond.hir_id.owner.def_id,