Skip to content

Commit e94a4d4

Browse files
Fix suggestion in get_unwrap lint
1 parent 6a14dc7 commit e94a4d4

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

clippy_lints/src/methods.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -871,8 +871,8 @@ fn lint_get_unwrap(cx: &LateContext, expr: &hir::Expr, get_args: &MethodArgs, is
871871
return; // caller is not a type that we want to lint
872872
};
873873

874-
let mut_str = if is_mut { "_mut" } else {""};
875-
let borrow_str = if is_mut { "&mut " } else {""};
874+
let mut_str = if is_mut { "_mut" } else { "" };
875+
let borrow_str = if is_mut { "&mut " } else { "&" };
876876
span_lint_and_then(
877877
cx,
878878
GET_UNWRAP,

0 commit comments

Comments
 (0)