aboutsummaryrefslogtreecommitdiff
path: root/crates
diff options
context:
space:
mode:
authorAleksey Kladov <[email protected]>2019-09-02 17:21:28 +0100
committerAleksey Kladov <[email protected]>2019-09-02 17:21:28 +0100
commite2b3844493ab681032cb0d472dca7fd63f7f3b61 (patch)
tree8be5bb466275b740440d5a9240dfee154cc175f5 /crates
parent4417a97bc519d8cf658dbd2d09e1d34c8b8f1f23 (diff)
remove needless clone
Diffstat (limited to 'crates')
-rw-r--r--crates/ra_mbe/src/mbe_expander.rs2
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));