Rollup merge of #95881 - TaKO8Ki:use-to-string-instead-of-format, r=compiler-errors
Use `to_string` instead of `format!`
This commit is contained in:
commit
3ff5cb20b6
@ -970,7 +970,7 @@ fn parse_crate_name_with_dashes(&mut self) -> PResult<'a, Ident> {
|
|||||||
}
|
}
|
||||||
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));
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user