diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2019-09-02 17:21:51 +0100 |
---|---|---|
committer | GitHub <[email protected]> | 2019-09-02 17:21:51 +0100 |
commit | 8de2fb37c045a4f4fc6dd1f49bd3b0157182086c (patch) | |
tree | 8be5bb466275b740440d5a9240dfee154cc175f5 /crates/ra_mbe/src | |
parent | 4417a97bc519d8cf658dbd2d09e1d34c8b8f1f23 (diff) | |
parent | e2b3844493ab681032cb0d472dca7fd63f7f3b61 (diff) |
Merge #1750
1750: remove needless clone r=matklad a=matklad
Co-authored-by: Aleksey Kladov <[email protected]>
Diffstat (limited to 'crates/ra_mbe/src')
-rw-r--r-- | crates/ra_mbe/src/mbe_expander.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/crates/ra_mbe/src/mbe_expander.rs b/crates/ra_mbe/src/mbe_expander.rs index adee0cb42..01641fdee 100644 --- a/crates/ra_mbe/src/mbe_expander.rs +++ b/crates/ra_mbe/src/mbe_expander.rs | |||
@@ -193,7 +193,7 @@ fn match_lhs(pattern: &crate::Subtree, input: &mut TtCursor) -> Result<Bindings, | |||
193 | match pat { | 193 | match pat { |
194 | crate::TokenTree::Leaf(leaf) => match leaf { | 194 | crate::TokenTree::Leaf(leaf) => match leaf { |
195 | crate::Leaf::Var(crate::Var { text, kind }) => { | 195 | crate::Leaf::Var(crate::Var { text, kind }) => { |
196 | let kind = kind.clone().ok_or(ExpandError::UnexpectedToken)?; | 196 | let kind = kind.as_ref().ok_or(ExpandError::UnexpectedToken)?; |
197 | match match_meta_var(kind.as_str(), input)? { | 197 | match match_meta_var(kind.as_str(), input)? { |
198 | Some(tt) => { | 198 | Some(tt) => { |
199 | res.inner.insert(text.clone(), Binding::Simple(tt)); | 199 | res.inner.insert(text.clone(), Binding::Simple(tt)); |