remove unnecessary to_string and String::new

This commit is contained in:
Takayuki Maeda
2022-06-13 15:48:40 +09:00
parent c570ab5a0b
commit 77d6176e69
88 changed files with 292 additions and 340 deletions

View File

@@ -369,7 +369,7 @@ pub(super) fn check_for_substitution<'a>(
"Unicode character '{}' ({}) looks like '{}' ({}), but it is not",
ch, u_name, ascii_char, ascii_name
);
err.span_suggestion(span, &msg, ascii_char.to_string(), Applicability::MaybeIncorrect);
err.span_suggestion(span, &msg, ascii_char, Applicability::MaybeIncorrect);
}
token.clone()
}