mirror of
https://github.com/rust-lang/rust-analyzer
synced 2025-01-13 13:48:50 +00:00
tt: Fix warnings about clippy str_to_string
rule
This commit is contained in:
parent
bffb8880d5
commit
1915d9abb7
1 changed files with 2 additions and 2 deletions
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue