Skip to content

Commit c3c4cda

Browse files
committed
Address review
1 parent 783992e commit c3c4cda

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

clippy_lints/src/methods/or_fun_call.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,11 +52,10 @@ pub(super) fn check<'tcx>(
5252
|| (matches!(path, sym::new) && implements_default(arg, default_trait_id));
5353

5454
then {
55-
let span_replace_word = method_span.with_hi(span.hi());
5655
span_lint_and_sugg(
5756
cx,
5857
OR_FUN_CALL,
59-
span_replace_word,
58+
method_span.with_hi(span.hi()),
6059
&format!("use of `{}` followed by a call to `{}`", name, path),
6160
"try this",
6261
"unwrap_or_default()".to_string(),

0 commit comments

Comments
 (0)