File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -203,12 +203,12 @@ pub fn derive(input: &Input) -> TokenStream {
203203 }
204204
205205
206- impl < ' a> std:: iter:: FromIterator <& ' a #name> for #vec_name {
207- fn from_iter<T : IntoIterator <Item =& ' a #name>>( iter: T ) -> Self {
206+ impl std:: iter:: FromIterator <#name> for #vec_name {
207+ fn from_iter<T : IntoIterator <Item =#name>>( iter: T ) -> Self {
208208 let mut result = #vec_name:: new( ) ;
209209 for element in iter {
210210 #(
211- ( result. #fields_names) . push( element. #fields_names. clone ( ) ) ;
211+ ( result. #fields_names) . push( element. #fields_names) ;
212212 ) *
213213 }
214214 result
Original file line number Diff line number Diff line change @@ -58,7 +58,7 @@ fn from_iter() {
5858 vec_with_particles. push ( Particle :: new ( String :: from ( "Cl" ) , 0.0 ) ) ;
5959 vec_with_particles. push ( Particle :: new ( String :: from ( "Zn" ) , 0.0 ) ) ;
6060
61- let particles_from_iter: ParticleVec = vec_with_particles. iter ( ) . collect ( ) ;
61+ let particles_from_iter: ParticleVec = vec_with_particles. into_iter ( ) . collect ( ) ;
6262
6363 let mut particles = ParticleVec :: new ( ) ;
6464 particles. push ( Particle :: new ( String :: from ( "Na" ) , 0.0 ) ) ;
You can’t perform that action at this time.
0 commit comments