Skip to content

Commit 83838f1

Browse files
committed
Remove unused code warning
1 parent 17b32c5 commit 83838f1

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
@@ -1393,7 +1393,7 @@ fn lint_get_unwrap(cx: &LateContext<'_, '_>, expr: &hir::Expr, get_args: &[hir::
13931393
// because they do not implement `IndexMut`
13941394
let expr_ty = cx.tables.expr_ty(&get_args[0]);
13951395
let get_args_str = snippet(cx, get_args[1].span, "_");
1396-
let mut needs_ref = false;
1396+
let needs_ref;
13971397
let caller_type = if derefs_to_slice(cx, &get_args[0], expr_ty).is_some() {
13981398
needs_ref = get_args_str.parse::<usize>().is_ok();
13991399
"slice"

0 commit comments

Comments
 (0)