1
Fork 0

don't clone types that are Copy (clippy::clone_on_copy)

This commit is contained in:
Matthias Krüger 2021-09-11 10:18:56 +02:00
parent 22719efcc5
commit c1e96085d3
15 changed files with 30 additions and 34 deletions

View file

@ -1357,9 +1357,7 @@ fn for_all_expns_in<E>(
mut f: impl FnMut(ExpnId, &ExpnData, ExpnHash) -> Result<(), E>,
) -> Result<(), E> {
let all_data: Vec<_> = HygieneData::with(|data| {
expns
.map(|expn| (expn, data.expn_data(expn).clone(), data.expn_hash(expn).clone()))
.collect()
expns.map(|expn| (expn, data.expn_data(expn).clone(), data.expn_hash(expn))).collect()
});
for (expn, data, hash) in all_data.into_iter() {
f(expn, &data, hash)?;