1
Fork 0

avoid &str to String conversions

This commit is contained in:
Takayuki Maeda 2022-07-20 18:19:57 +09:00
parent 57a155b9fa
commit 56e7777755
2 changed files with 9 additions and 10 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) };