Address review
This commit is contained in:
parent
783992e693
commit
c3c4cda50b
@ -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(),
|
||||
|
Loading…
Reference in New Issue
Block a user