1
Fork 0

Convert some functions to return Cow<'static,str> instead of String to reduce potential reallocations

This commit is contained in:
klensy 2021-08-22 19:55:45 +03:00
parent 2ad56d5c90
commit c565339c37
5 changed files with 53 additions and 51 deletions

View file

@ -806,7 +806,7 @@ impl<'a> Parser<'a> {
.span_suggestion_short(
sp,
&format!("missing `{}`", token_str),
token_str,
token_str.into(),
Applicability::MaybeIncorrect,
)
.emit();