Skip to content

Commit ab9b7a5

Browse files
committed
remove unnecessary reference
1 parent 1d08325 commit ab9b7a5

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

clippy_lints/src/loops/while_pop_unwrap.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ fn report_lint(cx: &LateContext<'_>, pop_span: Span, pop_stmt_kind: PopStmt<'_>,
3434
pop_span,
3535
"you seem to be trying to pop elements from a `Vec` in a loop",
3636
|diag| {
37-
let (pat, pop_replacement) = match &pop_stmt_kind {
37+
let (pat, pop_replacement) = match pop_stmt_kind {
3838
PopStmt::Local(pat) => (snippet(cx, pat.span, ".."), String::new()),
3939
PopStmt::Anonymous => (Cow::Borrowed("element"), "element".into()),
4040
};
@@ -78,7 +78,7 @@ fn check_local(cx: &LateContext<'_>, stmt: &Stmt<'_>, is_empty_recv: &Expr<'_>,
7878
&& let Some(init) = local.init
7979
&& is_vec_pop_unwrap(cx, init, is_empty_recv)
8080
{
81-
report_lint(cx, stmt.span, PopStmt::Local(&local.pat), loop_span, is_empty_recv.span);
81+
report_lint(cx, stmt.span, PopStmt::Local(local.pat), loop_span, is_empty_recv.span);
8282
}
8383
}
8484

0 commit comments

Comments
 (0)