diff options
| author | alex-semenyuk <alexsemenyuk88@gmail.com> | 2022-07-11 10:34:01 +0300 |
|---|---|---|
| committer | alex-semenyuk <alexsemenyuk88@gmail.com> | 2022-07-11 10:34:01 +0300 |
| commit | c3c4cda50b1b1b212eb02e5d822b3fd1479dc24c (patch) | |
| tree | 7326f49d53bfec6cdfeceaffdcf50a5efcb0dc2a | |
| parent | 783992e69389bff1890adaca4cac5967c6724b40 (diff) | |
| download | rust-c3c4cda50b1b1b212eb02e5d822b3fd1479dc24c.tar.gz rust-c3c4cda50b1b1b212eb02e5d822b3fd1479dc24c.zip | |
Address review
| -rw-r--r-- | clippy_lints/src/methods/or_fun_call.rs | 3 |
1 files changed, 1 insertions, 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(), |
