From e2b3844493ab681032cb0d472dca7fd63f7f3b61 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Mon, 2 Sep 2019 19:21:28 +0300 Subject: remove needless clone --- crates/ra_mbe/src/mbe_expander.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'crates') 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 match leaf { crate::Leaf::Var(crate::Var { text, kind }) => { - let kind = kind.clone().ok_or(ExpandError::UnexpectedToken)?; + let kind = kind.as_ref().ok_or(ExpandError::UnexpectedToken)?; match match_meta_var(kind.as_str(), input)? { Some(tt) => { res.inner.insert(text.clone(), Binding::Simple(tt)); -- cgit v1.2.3