1
Fork 0

clippy::perf fixes

This commit is contained in:
Matthias Krüger 2021-11-04 20:16:57 +01:00
parent 4961b107f2
commit 28ef4169cc
9 changed files with 13 additions and 13 deletions

View file

@ -344,7 +344,7 @@ impl<'o, 'tcx> dyn AstConv<'tcx> + 'o {
"reorder the arguments: {}: `<{}>`",
param_types_present
.into_iter()
.map(|ord| format!("{}s", ord.to_string()))
.map(|ord| format!("{}s", ord))
.collect::<Vec<String>>()
.join(", then "),
ordered_params

View file

@ -772,7 +772,7 @@ fn infer_placeholder_type<'a>(
} else {
err.span_note(
tcx.hir().body(body_id).value.span,
&format!("however, the inferred type `{}` cannot be named", ty.to_string()),
&format!("however, the inferred type `{}` cannot be named", ty),
);
}
}
@ -796,7 +796,7 @@ fn infer_placeholder_type<'a>(
} else {
diag.span_note(
tcx.hir().body(body_id).value.span,
&format!("however, the inferred type `{}` cannot be named", ty.to_string()),
&format!("however, the inferred type `{}` cannot be named", ty),
);
}
}