Skip to content

Commit 29c4128

Browse files
committed
use to_string instead of format!
1 parent 90ca447 commit 29c4128

File tree

1 file changed

+1
-1
lines changed
  • compiler/rustc_parse/src/parser

1 file changed

+1
-1
lines changed

compiler/rustc_parse/src/parser/item.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -970,7 +970,7 @@ impl<'a> Parser<'a> {
970970
}
971971
if fixed_crate_name {
972972
let fixed_name_sp = ident.span.to(idents.last().unwrap().span);
973-
let mut fixed_name = format!("{}", ident.name);
973+
let mut fixed_name = ident.name.to_string();
974974
for part in idents {
975975
fixed_name.push_str(&format!("_{}", part.name));
976976
}

0 commit comments

Comments
 (0)