mirror of
https://github.com/rust-lang/rust.git
synced 2025-01-26 14:43:24 +00:00
remove needless clone
This commit is contained in:
parent
4417a97bc5
commit
e2b3844493
@ -193,7 +193,7 @@ fn match_lhs(pattern: &crate::Subtree, input: &mut TtCursor) -> Result<Bindings,
|
||||
match pat {
|
||||
crate::TokenTree::Leaf(leaf) => 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));
|
||||
|
Loading…
Reference in New Issue
Block a user