From 048dad8c2e86006e53b3a134279729efb28b9e32 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matthias=20Kr=C3=BCger?= Date: Wed, 17 Mar 2021 01:56:31 +0100 Subject: don't clone types that are copy (clippy::clone_on_copy) --- crates/mbe/src/benchmark.rs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'crates/mbe/src/benchmark.rs') 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) -> Vec<(String, tt } Separator::Puncts(puncts) => { for it in puncts { - parent.token_trees.push(tt::Leaf::Punct(it.clone()).into()) + parent.token_trees.push(tt::Leaf::Punct(*it).into()) } } }; @@ -174,8 +174,7 @@ fn invocation_fixtures(rules: &FxHashMap) -> Vec<(String, tt } } Op::Subtree { tokens, delimiter } => { - let mut subtree = - tt::Subtree { delimiter: delimiter.clone(), token_trees: Vec::new() }; + let mut subtree = tt::Subtree { delimiter: *delimiter, token_trees: Vec::new() }; tokens.iter().for_each(|it| { collect_from_op(it, &mut subtree, seed); }); -- cgit v1.2.3