From 966c23f5290275ce17564f6027a17ec20cd6078f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matthias=20Kr=C3=BCger?= Date: Wed, 17 Mar 2021 01:27:56 +0100 Subject: avoid converting types into themselves via .into() (clippy::useless-conversion) example: let x: String = String::from("hello world").into(); --- crates/mbe/src/syntax_bridge.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'crates/mbe/src/syntax_bridge.rs') diff --git a/crates/mbe/src/syntax_bridge.rs b/crates/mbe/src/syntax_bridge.rs index b715ebfc4..85163c4b3 100644 --- a/crates/mbe/src/syntax_bridge.rs +++ b/crates/mbe/src/syntax_bridge.rs @@ -130,7 +130,7 @@ pub fn parse_exprs_with_sep(tt: &tt::Subtree, sep: char) -> Vec { res.push(match expanded.value { None => break, Some(tt @ tt::TokenTree::Leaf(_)) => { - tt::Subtree { delimiter: None, token_trees: vec![tt.into()] } + tt::Subtree { delimiter: None, token_trees: vec![tt] } } Some(tt::TokenTree::Subtree(tt)) => tt, }); @@ -727,7 +727,7 @@ impl<'a> TreeSink for TtTreeSink<'a> { // Note: We always assume the semi-colon would be the last token in // other parts of RA such that we don't add whitespace here. if curr.spacing == tt::Spacing::Alone && curr.char != ';' { - self.inner.token(WHITESPACE, " ".into()); + self.inner.token(WHITESPACE, " "); self.text_pos += TextSize::of(' '); } } -- cgit v1.2.3