aboutsummaryrefslogtreecommitdiff
path: root/crates/mbe/src/benchmark.rs
diff options
context:
space:
mode:
authorMatthias Krüger <[email protected]>2021-03-17 00:56:31 +0000
committerMatthias Krüger <[email protected]>2021-03-17 00:56:31 +0000
commit048dad8c2e86006e53b3a134279729efb28b9e32 (patch)
treeb9e584f4d1c276b60cb0bd7cee3a4ad158a0ac66 /crates/mbe/src/benchmark.rs
parentc5d654d5132b702d028ed00b5ec5c654a0b4a2fa (diff)
don't clone types that are copy (clippy::clone_on_copy)
Diffstat (limited to 'crates/mbe/src/benchmark.rs')
-rw-r--r--crates/mbe/src/benchmark.rs5
1 files changed, 2 insertions, 3 deletions
diff --git a/crates/mbe/src/benchmark.rs b/crates/mbe/src/benchmark.rs
index bd8ea6452..ba814a2e1 100644
--- a/crates/mbe/src/benchmark.rs
+++ b/crates/mbe/src/benchmark.rs
@@ -165,7 +165,7 @@ fn invocation_fixtures(rules: &FxHashMap<String, MacroRules>) -> Vec<(String, tt
165 } 165 }
166 Separator::Puncts(puncts) => { 166 Separator::Puncts(puncts) => {
167 for it in puncts { 167 for it in puncts {
168 parent.token_trees.push(tt::Leaf::Punct(it.clone()).into()) 168 parent.token_trees.push(tt::Leaf::Punct(*it).into())
169 } 169 }
170 } 170 }
171 }; 171 };
@@ -174,8 +174,7 @@ fn invocation_fixtures(rules: &FxHashMap<String, MacroRules>) -> Vec<(String, tt
174 } 174 }
175 } 175 }
176 Op::Subtree { tokens, delimiter } => { 176 Op::Subtree { tokens, delimiter } => {
177 let mut subtree = 177 let mut subtree = tt::Subtree { delimiter: *delimiter, token_trees: Vec::new() };
178 tt::Subtree { delimiter: delimiter.clone(), token_trees: Vec::new() };
179 tokens.iter().for_each(|it| { 178 tokens.iter().for_each(|it| {
180 collect_from_op(it, &mut subtree, seed); 179 collect_from_op(it, &mut subtree, seed);
181 }); 180 });