1
Fork 0

fix clippy::useless_format

This commit is contained in:
Matthias Krüger 2023-07-23 11:14:52 +02:00
parent adf759bf6a
commit b594798ae3
6 changed files with 12 additions and 16 deletions

View file

@ -1395,7 +1395,7 @@ impl<'a, 'tcx> Resolver<'a, 'tcx> {
let head_span = source_map.guess_head_span(span);
err.subdiagnostic(ConsiderAddingADerive {
span: head_span.shrink_to_lo(),
suggestion: format!("#[derive(Default)]\n")
suggestion: "#[derive(Default)]\n".to_string(),
});
}
for ns in [Namespace::MacroNS, Namespace::TypeNS, Namespace::ValueNS] {
@ -1718,7 +1718,7 @@ impl<'a, 'tcx> Resolver<'a, 'tcx> {
if next_binding.is_none() && let Some(span) = non_exhaustive {
note_span.push_span_label(
span,
format!("cannot be constructed because it is `#[non_exhaustive]`"),
"cannot be constructed because it is `#[non_exhaustive]`",
);
}
err.span_note(note_span, msg);