mirror of
https://github.com/rust-lang/rust-analyzer
synced 2024-12-28 14:03:35 +00:00
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
1 changed files with 4 additions and 8 deletions
|
@ -217,18 +217,14 @@ impl MacroRules {
|
||||||
|
|
||||||
impl Rule {
|
impl Rule {
|
||||||
fn parse(src: &mut TtIter) -> Result<Rule, ParseError> {
|
fn parse(src: &mut TtIter) -> Result<Rule, ParseError> {
|
||||||
let mut lhs = src
|
let lhs = src
|
||||||
.expect_subtree()
|
.expect_subtree()
|
||||||
.map_err(|()| ParseError::Expected("expected subtree".to_string()))?
|
.map_err(|()| ParseError::Expected("expected subtree".to_string()))?;
|
||||||
.clone();
|
|
||||||
lhs.delimiter = None;
|
|
||||||
src.expect_char('=').map_err(|()| ParseError::Expected("expected `=`".to_string()))?;
|
src.expect_char('=').map_err(|()| ParseError::Expected("expected `=`".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()
|
.expect_subtree()
|
||||||
.map_err(|()| ParseError::Expected("expected subtree".to_string()))?
|
.map_err(|()| ParseError::Expected("expected subtree".to_string()))?;
|
||||||
.clone();
|
|
||||||
rhs.delimiter = None;
|
|
||||||
|
|
||||||
let lhs = MetaTemplate { tokens: parse_pattern(&lhs), delimiter: None };
|
let lhs = MetaTemplate { tokens: parse_pattern(&lhs), delimiter: None };
|
||||||
let rhs = MetaTemplate { tokens: parse_template(&rhs), delimiter: None };
|
let rhs = MetaTemplate { tokens: parse_template(&rhs), delimiter: None };
|
||||||
|
|
Loading…
Reference in a new issue