Skip to content

Commit 7b82acd

Browse files
committed
rust: concat_idents: use format! for concatenation
This is part of the effort to minimize the differences of the `rust` branch with respect to mainline in order to eventually drop it. Signed-off-by: Miguel Ojeda <[email protected]>
1 parent 74f7ad4 commit 7b82acd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

rust/macros/concat_idents.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,6 @@ pub(crate) fn concat_idents(ts: TokenStream) -> TokenStream {
1818
assert_eq!(expect_punct(&mut it), ',');
1919
let b = expect_ident(&mut it);
2020
assert!(it.next().is_none(), "only two idents can be concatenated");
21-
let res = Ident::new(&(a.to_string() + &b.to_string()), b.span());
21+
let res = Ident::new(&format!("{a}{b}"), b.span());
2222
TokenStream::from_iter([TokenTree::Ident(res)])
2323
}

0 commit comments

Comments
 (0)