5353{
5454 fn from_collection < I : IntoIterator < Item = T > > ( iter : I ) -> Self {
5555 let mut it = iter. into_iter ( ) ;
56- std:: array:: from_fn ( |_| {
57- it. next ( ) . expect ( "Not enough elements in iterator" )
58- } )
56+ std:: array:: from_fn ( |_| it. next ( ) . expect ( "Not enough elements in iterator" ) )
5957 }
6058}
6159impl < T > CollectionResponse < T > for [ T ; 2 ]
6462{
6563 fn from_collection < I : IntoIterator < Item = T > > ( iter : I ) -> Self {
6664 let mut it = iter. into_iter ( ) ;
67- std:: array:: from_fn ( |_| {
68- it. next ( ) . expect ( "Not enough elements in iterator" )
69- } )
65+ std:: array:: from_fn ( |_| it. next ( ) . expect ( "Not enough elements in iterator" ) )
7066 }
7167}
7268impl < T > CollectionResponse < T > for [ T ; 3 ]
7571{
7672 fn from_collection < I : IntoIterator < Item = T > > ( iter : I ) -> Self {
7773 let mut it = iter. into_iter ( ) ;
78- std:: array:: from_fn ( |_| {
79- it. next ( ) . expect ( "Not enough elements in iterator" )
80- } )
74+ std:: array:: from_fn ( |_| it. next ( ) . expect ( "Not enough elements in iterator" ) )
8175 }
8276}
8377impl < T > CollectionResponse < T > for [ T ; 4 ]
8680{
8781 fn from_collection < I : IntoIterator < Item = T > > ( iter : I ) -> Self {
8882 let mut it = iter. into_iter ( ) ;
89- std:: array:: from_fn ( |_| {
90- it. next ( ) . expect ( "Not enough elements in iterator" )
91- } )
83+ std:: array:: from_fn ( |_| it. next ( ) . expect ( "Not enough elements in iterator" ) )
9284 }
9385}
9486impl < T > CollectionResponse < T > for [ T ; 5 ]
9789{
9890 fn from_collection < I : IntoIterator < Item = T > > ( iter : I ) -> Self {
9991 let mut it = iter. into_iter ( ) ;
100- std:: array:: from_fn ( |_| {
101- it. next ( ) . expect ( "Not enough elements in iterator" )
102- } )
92+ std:: array:: from_fn ( |_| it. next ( ) . expect ( "Not enough elements in iterator" ) )
10393 }
10494}
10595impl < T > CollectionResponse < T > for [ T ; 6 ]
10898{
10999 fn from_collection < I : IntoIterator < Item = T > > ( iter : I ) -> Self {
110100 let mut it = iter. into_iter ( ) ;
111- std:: array:: from_fn ( |_| {
112- it. next ( ) . expect ( "Not enough elements in iterator" )
113- } )
101+ std:: array:: from_fn ( |_| it. next ( ) . expect ( "Not enough elements in iterator" ) )
114102 }
115103}
116104impl < T > CollectionResponse < T > for [ T ; 7 ]
@@ -119,9 +107,7 @@ where
119107{
120108 fn from_collection < I : IntoIterator < Item = T > > ( iter : I ) -> Self {
121109 let mut it = iter. into_iter ( ) ;
122- std:: array:: from_fn ( |_| {
123- it. next ( ) . expect ( "Not enough elements in iterator" )
124- } )
110+ std:: array:: from_fn ( |_| it. next ( ) . expect ( "Not enough elements in iterator" ) )
125111 }
126112}
127113impl < T > CollectionResponse < T > for [ T ; 8 ]
@@ -130,9 +116,7 @@ where
130116{
131117 fn from_collection < I : IntoIterator < Item = T > > ( iter : I ) -> Self {
132118 let mut it = iter. into_iter ( ) ;
133- std:: array:: from_fn ( |_| {
134- it. next ( ) . expect ( "Not enough elements in iterator" )
135- } )
119+ std:: array:: from_fn ( |_| it. next ( ) . expect ( "Not enough elements in iterator" ) )
136120 }
137121}
138122impl < T > CollectionResponse < T > for [ T ; 9 ]
@@ -141,9 +125,7 @@ where
141125{
142126 fn from_collection < I : IntoIterator < Item = T > > ( iter : I ) -> Self {
143127 let mut it = iter. into_iter ( ) ;
144- std:: array:: from_fn ( |_| {
145- it. next ( ) . expect ( "Not enough elements in iterator" )
146- } )
128+ std:: array:: from_fn ( |_| it. next ( ) . expect ( "Not enough elements in iterator" ) )
147129 }
148130}
149131impl < T > CollectionResponse < T > for [ T ; 10 ]
@@ -152,9 +134,7 @@ where
152134{
153135 fn from_collection < I : IntoIterator < Item = T > > ( iter : I ) -> Self {
154136 let mut it = iter. into_iter ( ) ;
155- std:: array:: from_fn ( |_| {
156- it. next ( ) . expect ( "Not enough elements in iterator" )
157- } )
137+ std:: array:: from_fn ( |_| it. next ( ) . expect ( "Not enough elements in iterator" ) )
158138 }
159139}
160140impl < T > CollectionResponse < T > for [ T ; 11 ]
@@ -163,9 +143,7 @@ where
163143{
164144 fn from_collection < I : IntoIterator < Item = T > > ( iter : I ) -> Self {
165145 let mut it = iter. into_iter ( ) ;
166- std:: array:: from_fn ( |_| {
167- it. next ( ) . expect ( "Not enough elements in iterator" )
168- } )
146+ std:: array:: from_fn ( |_| it. next ( ) . expect ( "Not enough elements in iterator" ) )
169147 }
170148}
171149impl < T > CollectionResponse < T > for [ T ; 12 ]
@@ -174,9 +152,7 @@ where
174152{
175153 fn from_collection < I : IntoIterator < Item = T > > ( iter : I ) -> Self {
176154 let mut it = iter. into_iter ( ) ;
177- std:: array:: from_fn ( |_| {
178- it. next ( ) . expect ( "Not enough elements in iterator" )
179- } )
155+ std:: array:: from_fn ( |_| it. next ( ) . expect ( "Not enough elements in iterator" ) )
180156 }
181157}
182158impl < T > CollectionResponse < T > for [ T ; 13 ]
@@ -185,9 +161,7 @@ where
185161{
186162 fn from_collection < I : IntoIterator < Item = T > > ( iter : I ) -> Self {
187163 let mut it = iter. into_iter ( ) ;
188- std:: array:: from_fn ( |_| {
189- it. next ( ) . expect ( "Not enough elements in iterator" )
190- } )
164+ std:: array:: from_fn ( |_| it. next ( ) . expect ( "Not enough elements in iterator" ) )
191165 }
192166}
193167impl < T > CollectionResponse < T > for [ T ; 14 ]
@@ -196,9 +170,7 @@ where
196170{
197171 fn from_collection < I : IntoIterator < Item = T > > ( iter : I ) -> Self {
198172 let mut it = iter. into_iter ( ) ;
199- std:: array:: from_fn ( |_| {
200- it. next ( ) . expect ( "Not enough elements in iterator" )
201- } )
173+ std:: array:: from_fn ( |_| it. next ( ) . expect ( "Not enough elements in iterator" ) )
202174 }
203175}
204176impl < T > CollectionResponse < T > for [ T ; 15 ]
@@ -207,9 +179,7 @@ where
207179{
208180 fn from_collection < I : IntoIterator < Item = T > > ( iter : I ) -> Self {
209181 let mut it = iter. into_iter ( ) ;
210- std:: array:: from_fn ( |_| {
211- it. next ( ) . expect ( "Not enough elements in iterator" )
212- } )
182+ std:: array:: from_fn ( |_| it. next ( ) . expect ( "Not enough elements in iterator" ) )
213183 }
214184}
215185
0 commit comments