diff options
author | Matthias Krüger <[email protected]> | 2021-03-17 00:27:56 +0000 |
---|---|---|
committer | Matthias Krüger <[email protected]> | 2021-03-17 00:27:56 +0000 |
commit | 966c23f5290275ce17564f6027a17ec20cd6078f (patch) | |
tree | 9e977a29eaf10d1733340563ef31fda064e37400 /crates/mbe/src/syntax_bridge.rs | |
parent | 83e6940efb42675226adb8d2856c095b8dce36c5 (diff) |
avoid converting types into themselves via .into() (clippy::useless-conversion)
example: let x: String = String::from("hello world").into();
Diffstat (limited to 'crates/mbe/src/syntax_bridge.rs')
-rw-r--r-- | crates/mbe/src/syntax_bridge.rs | 4 |
1 files changed, 2 insertions, 2 deletions
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<tt::Subtree> { | |||
130 | res.push(match expanded.value { | 130 | res.push(match expanded.value { |
131 | None => break, | 131 | None => break, |
132 | Some(tt @ tt::TokenTree::Leaf(_)) => { | 132 | Some(tt @ tt::TokenTree::Leaf(_)) => { |
133 | tt::Subtree { delimiter: None, token_trees: vec![tt.into()] } | 133 | tt::Subtree { delimiter: None, token_trees: vec![tt] } |
134 | } | 134 | } |
135 | Some(tt::TokenTree::Subtree(tt)) => tt, | 135 | Some(tt::TokenTree::Subtree(tt)) => tt, |
136 | }); | 136 | }); |
@@ -727,7 +727,7 @@ impl<'a> TreeSink for TtTreeSink<'a> { | |||
727 | // Note: We always assume the semi-colon would be the last token in | 727 | // Note: We always assume the semi-colon would be the last token in |
728 | // other parts of RA such that we don't add whitespace here. | 728 | // other parts of RA such that we don't add whitespace here. |
729 | if curr.spacing == tt::Spacing::Alone && curr.char != ';' { | 729 | if curr.spacing == tt::Spacing::Alone && curr.char != ';' { |
730 | self.inner.token(WHITESPACE, " ".into()); | 730 | self.inner.token(WHITESPACE, " "); |
731 | self.text_pos += TextSize::of(' '); | 731 | self.text_pos += TextSize::of(' '); |
732 | } | 732 | } |
733 | } | 733 | } |