Skip to content

Commit 72497a8

Browse files
committed
Remove unused code warning
1 parent 1734866 commit 72497a8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

clippy_lints/src/methods.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1389,7 +1389,7 @@ fn lint_get_unwrap(cx: &LateContext<'_, '_>, expr: &hir::Expr, get_args: &[hir::
13891389
// because they do not implement `IndexMut`
13901390
let expr_ty = cx.tables.expr_ty(&get_args[0]);
13911391
let get_args_str = snippet(cx, get_args[1].span, "_");
1392-
let mut needs_ref = false;
1392+
let needs_ref;
13931393
let caller_type = if derefs_to_slice(cx, &get_args[0], expr_ty).is_some() {
13941394
needs_ref = get_args_str.parse::<usize>().is_ok();
13951395
"slice"

0 commit comments

Comments
 (0)