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));
|
|| (matches!(path, sym::new) && implements_default(arg, default_trait_id));
|
||||||
|
|
||||||
then {
|
then {
|
||||||
let span_replace_word = method_span.with_hi(span.hi());
|
|
||||||
span_lint_and_sugg(
|
span_lint_and_sugg(
|
||||||
cx,
|
cx,
|
||||||
OR_FUN_CALL,
|
OR_FUN_CALL,
|
||||||
span_replace_word,
|
method_span.with_hi(span.hi()),
|
||||||
&format!("use of `{}` followed by a call to `{}`", name, path),
|
&format!("use of `{}` followed by a call to `{}`", name, path),
|
||||||
"try this",
|
"try this",
|
||||||
"unwrap_or_default()".to_string(),
|
"unwrap_or_default()".to_string(),
|
||||||
|
Loading…
Reference in New Issue
Block a user