Skip to content

Commit 790e611

Browse files
committed
Cleanup
1 parent a3c77f6 commit 790e611

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

clippy_lints/src/redundant_clone.rs

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ use crate::rustc::hir::{def_id, Body, FnDecl};
1212
use crate::rustc::lint::{LateContext, LateLintPass, LintArray, LintPass};
1313
use crate::rustc::mir::{
1414
self, traversal,
15-
visit::{MutatingUseContext, NonUseContext, PlaceContext, Visitor},
15+
visit::{MutatingUseContext, PlaceContext, Visitor},
1616
TerminatorKind,
1717
};
1818
use crate::rustc::ty;
@@ -279,10 +279,8 @@ impl<'tcx> mir::visit::Visitor<'tcx> for LocalUseVisitor {
279279

280280
fn visit_local(&mut self, local: &mir::Local, ctx: PlaceContext<'tcx>, _: mir::Location) {
281281
match ctx {
282-
PlaceContext::MutatingUse(MutatingUseContext::Drop) | PlaceContext::NonUse(NonUseContext::StorageDead) => {
283-
return;
284-
},
285-
_ => {},
282+
PlaceContext::MutatingUse(MutatingUseContext::Drop) | PlaceContext::NonUse(_) => return,
283+
_ => {}
286284
}
287285

288286
if *local == self.local {

0 commit comments

Comments
 (0)