Skip to content

Commit

Permalink
use to_string instead of format!
Browse files Browse the repository at this point in the history
  • Loading branch information
TaKO8Ki committed Apr 11, 2022
1 parent 90ca447 commit 29c4128
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion compiler/rustc_parse/src/parser/item.rs
Original file line number Diff line number Diff line change
Expand Up @@ -970,7 +970,7 @@ impl<'a> Parser<'a> {
}
if fixed_crate_name {
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 {
fixed_name.push_str(&format!("_{}", part.name));
}
Expand Down

0 comments on commit 29c4128

Please sign in to comment.