Skip to content

Commit 1664dcf

Browse files
authored
Rollup merge of #95881 - TaKO8Ki:use-to-string-instead-of-format, r=compiler-errors
Use `to_string` instead of `format!`
2 parents 5470c2c + 80152ed commit 1664dcf

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)