1
Fork 0

use to_string instead of format!

This commit is contained in:
Takayuki Maeda 2022-04-10 20:39:02 +09:00
parent 90ca44752a
commit 29c41280a1

View file

@ -970,7 +970,7 @@ impl<'a> Parser<'a> {
} }
if fixed_crate_name { if fixed_crate_name {
let fixed_name_sp = ident.span.to(idents.last().unwrap().span); let fixed_name_sp = ident.span.to(idents.last().unwrap().span);
let mut fixed_name = format!("{}", ident.name); let mut fixed_name = ident.name.to_string();
for part in idents { for part in idents {
fixed_name.push_str(&format!("_{}", part.name)); fixed_name.push_str(&format!("_{}", part.name));
} }