1
Fork 0

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

This commit is contained in:
Matthias Krüger 2020-12-11 17:49:00 +01:00
parent 82fe5c1662
commit db6c50998c
4 changed files with 6 additions and 6 deletions

View file

@ -217,7 +217,7 @@ impl<'a, 'tcx> Helper<'a, 'tcx> {
// go through each target, finding a discriminant read, and a switch
let results = discr.targets_with_values.iter().map(|(value, target)| {
self.find_discriminant_switch_pairing(&discr, target.clone(), value.clone())
self.find_discriminant_switch_pairing(&discr, *target, *value)
});
// if the optimization did not apply for one of the targets, then abort