Auto merge of #100497 - kadiwa4:remove_clone_into_iter, r=cjgillot
Avoid cloning a collection only to iterate over it `@rustbot` label: +C-cleanup
This commit is contained in:
commit
ce36e88256
12 changed files with 31 additions and 31 deletions
|
@ -383,8 +383,7 @@ fn find_type_parameters(
|
|||
// Place bound generic params on a stack, to extract them when a type is encountered.
|
||||
fn visit_poly_trait_ref(&mut self, trait_ref: &'a ast::PolyTraitRef) {
|
||||
let stack_len = self.bound_generic_params_stack.len();
|
||||
self.bound_generic_params_stack
|
||||
.extend(trait_ref.bound_generic_params.clone().into_iter());
|
||||
self.bound_generic_params_stack.extend(trait_ref.bound_generic_params.iter().cloned());
|
||||
|
||||
visit::walk_poly_trait_ref(self, trait_ref);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue