}
match kind {
- FnKind::ItemFn(.., header, _) => {
+ FnKind::ItemFn(.., header) => {
let attrs = cx.tcx.hir().attrs(hir_id);
if header.abi != Abi::Rust || requires_exact_signature(attrs) {
return;
for (span, suggestion) in clone_spans {
diag.span_suggestion(
span,
- &snippet_opt(cx, span)
+ snippet_opt(cx, span)
.map_or(
"change the call to".into(),
|x| Cow::from(format!("change `{}` to", x)),
- ),
- suggestion.into(),
+ )
+ .as_ref(),
+ suggestion,
Applicability::Unspecified,
);
}
for (span, suggestion) in clone_spans {
diag.span_suggestion(
span,
- &snippet_opt(cx, span)
+ snippet_opt(cx, span)
.map_or(
"change the call to".into(),
|x| Cow::from(format!("change `{}` to", x))
- ),
- suggestion.into(),
+ )
+ .as_ref(),
+ suggestion,
Applicability::Unspecified,
);
}