mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-28 21:05:02 +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) {
|
match (it, last) {
|
||||||
(Leaf::Ident(_), Some(&TokenTree::Leaf(Leaf::Ident(_)))) => {
|
(Leaf::Ident(_), Some(&TokenTree::Leaf(Leaf::Ident(_)))) => {
|
||||||
" ".to_string() + &s
|
" ".to_owned() + &s
|
||||||
}
|
}
|
||||||
(Leaf::Punct(_), Some(TokenTree::Leaf(Leaf::Punct(punct)))) => {
|
(Leaf::Punct(_), Some(TokenTree::Leaf(Leaf::Punct(punct)))) => {
|
||||||
if punct.spacing == Spacing::Alone {
|
if punct.spacing == Spacing::Alone {
|
||||||
" ".to_string() + &s
|
" ".to_owned() + &s
|
||||||
} else {
|
} else {
|
||||||
s
|
s
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue