Skip to content

Commit

Permalink
Rollup merge of #95881 - TaKO8Ki:use-to-string-instead-of-format, r=c…
Browse files Browse the repository at this point in the history
…ompiler-errors

Use `to_string` instead of `format!`
  • Loading branch information
matthiaskrgr authored Apr 12, 2022
2 parents a899ebd + 29c4128 commit 3ff5cb2
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 3ff5cb2

Please sign in to comment.