Remove unnecessary .to_string()/.as_str()s

This commit is contained in:
trevyn 2024-02-02 15:16:05 -08:00
parent bf3c6c5bed
commit ef37dcb7db
10 changed files with 15 additions and 15 deletions

View file

@ -699,7 +699,7 @@ impl<'a: 'ast, 'ast, 'tcx> LateResolutionVisitor<'a, '_, 'ast, 'tcx> {
err.span_suggestion_verbose(
span.shrink_to_lo(),
msg,
"self.".to_string(),
"self.",
Applicability::MachineApplicable,
);
}
@ -710,7 +710,7 @@ impl<'a: 'ast, 'ast, 'tcx> LateResolutionVisitor<'a, '_, 'ast, 'tcx> {
err.span_suggestion_verbose(
span.shrink_to_lo(),
format!("you might have meant to {}", candidate.action()),
"Self::".to_string(),
"Self::",
Applicability::MachineApplicable,
);
}