Address review

This commit is contained in:
alex-semenyuk 2022-07-11 10:34:01 +03:00
parent 783992e693
commit c3c4cda50b

View File

@ -52,11 +52,10 @@ fn check_unwrap_or_default(
|| (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(),