From e94a4d466688d2baae80bd2c0ec4418598e3d5dd Mon Sep 17 00:00:00 2001 From: Devon Hollowood Date: Wed, 2 Nov 2016 11:48:16 -0700 Subject: [PATCH] Fix suggestion in `get_unwrap` lint --- clippy_lints/src/methods.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/clippy_lints/src/methods.rs b/clippy_lints/src/methods.rs index 32d230bd73d5..70ae2e6a189f 100644 --- a/clippy_lints/src/methods.rs +++ b/clippy_lints/src/methods.rs @@ -871,8 +871,8 @@ fn lint_get_unwrap(cx: &LateContext, expr: &hir::Expr, get_args: &MethodArgs, is return; // caller is not a type that we want to lint }; - let mut_str = if is_mut { "_mut" } else {""}; - let borrow_str = if is_mut { "&mut " } else {""}; + let mut_str = if is_mut { "_mut" } else { "" }; + let borrow_str = if is_mut { "&mut " } else { "&" }; span_lint_and_then( cx, GET_UNWRAP,