tt: Fix warnings about clippy str_to_string rule

This commit is contained in:
Tetsuharu Ohzeki 2024-02-10 00:59:19 +09:00
parent bffb8880d5
commit 1915d9abb7

View file

@ -336,11 +336,11 @@ impl<S> Subtree<S> {
};
match (it, last) {
(Leaf::Ident(_), Some(&TokenTree::Leaf(Leaf::Ident(_)))) => {
" ".to_string() + &s
" ".to_owned() + &s
}
(Leaf::Punct(_), Some(TokenTree::Leaf(Leaf::Punct(punct)))) => {
if punct.spacing == Spacing::Alone {
" ".to_string() + &s
" ".to_owned() + &s
} else {
s
}