From c3c4cda50b1b1b212eb02e5d822b3fd1479dc24c Mon Sep 17 00:00:00 2001 From: alex-semenyuk Date: Mon, 11 Jul 2022 10:34:01 +0300 Subject: [PATCH] Address review --- clippy_lints/src/methods/or_fun_call.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/clippy_lints/src/methods/or_fun_call.rs b/clippy_lints/src/methods/or_fun_call.rs index 5a356108434..6af134019a4 100644 --- a/clippy_lints/src/methods/or_fun_call.rs +++ b/clippy_lints/src/methods/or_fun_call.rs @@ -52,11 +52,10 @@ pub(super) fn check<'tcx>( || (matches!(path, sym::new) && implements_default(arg, default_trait_id)); then { - let span_replace_word = method_span.with_hi(span.hi()); span_lint_and_sugg( cx, OR_FUN_CALL, - span_replace_word, + method_span.with_hi(span.hi()), &format!("use of `{}` followed by a call to `{}`", name, path), "try this", "unwrap_or_default()".to_string(),