avoid cloning and then iterating
This commit is contained in:
parent
75b7e52e92
commit
4eebcb9910
12 changed files with 31 additions and 31 deletions
|
@ -385,8 +385,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