diff --git a/clippy_lints/src/matches.rs b/clippy_lints/src/matches.rs index 90b616b20d4b..420005d20928 100644 --- a/clippy_lints/src/matches.rs +++ b/clippy_lints/src/matches.rs @@ -219,10 +219,10 @@ fn report_single_match_single_pattern(cx: &LateContext, ex: &Expr, arms: &[Arm], db.span_suggestion(expr.span, "try this", format!("if let {} = {} {}{}", - snippet(cx, arms[0].pats[0].span, ".."), - snippet(cx, ex.span, ".."), - expr_block(cx, &arms[0].body, None, ".."), - els_str)); + snippet(cx, arms[0].pats[0].span, ".."), + snippet(cx, ex.span, ".."), + expr_block(cx, &arms[0].body, None, ".."), + els_str)); }); }