aboutsummaryrefslogtreecommitdiff
path: root/crates/proc_macro_api
diff options
context:
space:
mode:
authorMatthias Krüger <[email protected]>2021-03-17 00:27:56 +0000
committerMatthias Krüger <[email protected]>2021-03-17 00:27:56 +0000
commit966c23f5290275ce17564f6027a17ec20cd6078f (patch)
tree9e977a29eaf10d1733340563ef31fda064e37400 /crates/proc_macro_api
parent83e6940efb42675226adb8d2856c095b8dce36c5 (diff)
avoid converting types into themselves via .into() (clippy::useless-conversion)
example: let x: String = String::from("hello world").into();
Diffstat (limited to 'crates/proc_macro_api')
-rw-r--r--crates/proc_macro_api/src/rpc.rs11
1 files changed, 4 insertions, 7 deletions
diff --git a/crates/proc_macro_api/src/rpc.rs b/crates/proc_macro_api/src/rpc.rs
index 64cfdafc5..9a68e2cc5 100644
--- a/crates/proc_macro_api/src/rpc.rs
+++ b/crates/proc_macro_api/src/rpc.rs
@@ -236,13 +236,10 @@ mod tests {
236 subtree 236 subtree
237 .token_trees 237 .token_trees
238 .push(TokenTree::Leaf(Ident { text: "Foo".into(), id: TokenId(1) }.into())); 238 .push(TokenTree::Leaf(Ident { text: "Foo".into(), id: TokenId(1) }.into()));
239 subtree.token_trees.push(TokenTree::Subtree( 239 subtree.token_trees.push(TokenTree::Subtree(Subtree {
240 Subtree { 240 delimiter: Some(Delimiter { id: TokenId(2), kind: DelimiterKind::Brace }),
241 delimiter: Some(Delimiter { id: TokenId(2), kind: DelimiterKind::Brace }), 241 token_trees: vec![],
242 token_trees: vec![], 242 }));
243 }
244 .into(),
245 ));
246 subtree 243 subtree
247 } 244 }
248 245