Merge #7099
7099: Remove unused clones in mbe r=edwin0cheng a=edwin0cheng bors r+ Co-authored-by: Edwin Cheng <edwin0cheng@gmail.com>
This commit is contained in:
commit
bed7be9ed9
@ -217,18 +217,14 @@ pub fn map_id_up(&self, id: tt::TokenId) -> (tt::TokenId, Origin) {
|
||||
|
||||
impl Rule {
|
||||
fn parse(src: &mut TtIter) -> Result<Rule, ParseError> {
|
||||
let mut lhs = src
|
||||
let lhs = src
|
||||
.expect_subtree()
|
||||
.map_err(|()| ParseError::Expected("expected subtree".to_string()))?
|
||||
.clone();
|
||||
lhs.delimiter = None;
|
||||
.map_err(|()| ParseError::Expected("expected subtree".to_string()))?;
|
||||
src.expect_char('=').map_err(|()| ParseError::Expected("expected `=`".to_string()))?;
|
||||
src.expect_char('>').map_err(|()| ParseError::Expected("expected `>`".to_string()))?;
|
||||
let mut rhs = src
|
||||
let rhs = src
|
||||
.expect_subtree()
|
||||
.map_err(|()| ParseError::Expected("expected subtree".to_string()))?
|
||||
.clone();
|
||||
rhs.delimiter = None;
|
||||
.map_err(|()| ParseError::Expected("expected subtree".to_string()))?;
|
||||
|
||||
let lhs = MetaTemplate { tokens: parse_pattern(&lhs), delimiter: None };
|
||||
let rhs = MetaTemplate { tokens: parse_template(&rhs), delimiter: None };
|
||||
|
Loading…
Reference in New Issue
Block a user