Rollup merge of #99508 - TaKO8Ki:avoid-symbol-to-string-conversion-in-BuiltinLintDiagnostics, r=compiler-errors

Avoid `Symbol` to `String` conversions

follow-up to #99342
This commit is contained in:
Matthias Krüger 2022-07-20 18:58:20 +02:00 committed by GitHub
commit 4b21ad26df
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 11 additions and 14 deletions

View file

@ -2603,9 +2603,9 @@ fn show_candidates(
.skip(1)
.all(|(_, descr, _, _)| descr == descr_first)
{
descr_first.to_string()
descr_first
} else {
"item".to_string()
"item"
};
let plural_descr =
if descr.ends_with("s") { format!("{}es", descr) } else { format!("{}s", descr) };