aboutsummaryrefslogtreecommitdiff
path: root/crates
diff options
context:
space:
mode:
authorbors[bot] <26634292+bors[bot]@users.noreply.github.com>2020-12-30 19:10:56 +0000
committerGitHub <[email protected]>2020-12-30 19:10:56 +0000
commitbed7be9ed9f3eb905ae1c377f154fe0990b4c87f (patch)
treeec564e375d1bd1fa12044500b49d7d9e1afbf6ab /crates
parentbf5301ce3b09a85ab13546b9b029e3f1c0c7a000 (diff)
parentede1b11741f2758effaf110dca52f31e39503049 (diff)
Merge #7099
7099: Remove unused clones in mbe r=edwin0cheng a=edwin0cheng bors r+ Co-authored-by: Edwin Cheng <[email protected]>
Diffstat (limited to 'crates')
-rw-r--r--crates/mbe/src/lib.rs12
1 files changed, 4 insertions, 8 deletions
diff --git a/crates/mbe/src/lib.rs b/crates/mbe/src/lib.rs
index 7878faaa4..b3472879d 100644
--- a/crates/mbe/src/lib.rs
+++ b/crates/mbe/src/lib.rs
@@ -217,18 +217,14 @@ impl MacroRules {
217 217
218impl Rule { 218impl Rule {
219 fn parse(src: &mut TtIter) -> Result<Rule, ParseError> { 219 fn parse(src: &mut TtIter) -> Result<Rule, ParseError> {
220 let mut lhs = src 220 let lhs = src
221 .expect_subtree() 221 .expect_subtree()
222 .map_err(|()| ParseError::Expected("expected subtree".to_string()))? 222 .map_err(|()| ParseError::Expected("expected subtree".to_string()))?;
223 .clone();
224 lhs.delimiter = None;
225 src.expect_char('=').map_err(|()| ParseError::Expected("expected `=`".to_string()))?; 223 src.expect_char('=').map_err(|()| ParseError::Expected("expected `=`".to_string()))?;
226 src.expect_char('>').map_err(|()| ParseError::Expected("expected `>`".to_string()))?; 224 src.expect_char('>').map_err(|()| ParseError::Expected("expected `>`".to_string()))?;
227 let mut rhs = src 225 let rhs = src
228 .expect_subtree() 226 .expect_subtree()
229 .map_err(|()| ParseError::Expected("expected subtree".to_string()))? 227 .map_err(|()| ParseError::Expected("expected subtree".to_string()))?;
230 .clone();
231 rhs.delimiter = None;
232 228
233 let lhs = MetaTemplate { tokens: parse_pattern(&lhs), delimiter: None }; 229 let lhs = MetaTemplate { tokens: parse_pattern(&lhs), delimiter: None };
234 let rhs = MetaTemplate { tokens: parse_template(&rhs), delimiter: None }; 230 let rhs = MetaTemplate { tokens: parse_template(&rhs), delimiter: None };