Skip to content

Commit 2c27b58

Browse files
committed
tiny clean-up
1 parent f8180c3 commit 2c27b58

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

clippy_lints/src/toplevel_ref_arg.rs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -89,10 +89,9 @@ impl<'tcx> LateLintPass<'tcx> for ToplevelRefArg {
8989
let ctxt = local.span.ctxt();
9090
let mut app = Applicability::MachineApplicable;
9191
let sugg_init = Sugg::hir_with_context(cx, init, ctxt, "..", &mut app);
92-
let (mutopt, initref) = if mutabl == Mutability::Mut {
93-
("mut ", sugg_init.mut_addr())
94-
} else {
95-
("", sugg_init.addr())
92+
let (mutopt, initref) = match mutabl {
93+
Mutability::Mut => ("mut ", sugg_init.mut_addr()),
94+
Mutability::Not => ("", sugg_init.addr()),
9695
};
9796
let tyopt = if let Some(ty) = local.ty {
9897
let ty_snip = snippet_with_context(cx, ty.span, ctxt, "_", &mut app).0;

0 commit comments

Comments
 (0)