diff options
| author | Matthias Krüger <matthias.krueger@famsik.de> | 2021-09-11 10:18:56 +0200 |
|---|---|---|
| committer | Matthias Krüger <matthias.krueger@famsik.de> | 2021-09-11 10:18:56 +0200 |
| commit | c1e96085d36af614ac9bb1c36dde9a5706eef6ec (patch) | |
| tree | e7d6ffbd044166109bab8167a329bd51094c280c /compiler/rustc_span/src | |
| parent | 22719efcc570b043f2e519d6025e5f36eab38fe2 (diff) | |
don't clone types that are Copy (clippy::clone_on_copy)
Diffstat (limited to 'compiler/rustc_span/src')
| -rw-r--r-- | compiler/rustc_span/src/hygiene.rs | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/compiler/rustc_span/src/hygiene.rs b/compiler/rustc_span/src/hygiene.rs index c22093c5a42..ef60608a27c 100644 --- a/compiler/rustc_span/src/hygiene.rs +++ b/compiler/rustc_span/src/hygiene.rs @@ -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)?; |
