@@ -115,7 +115,7 @@ pub mod tonic {
115115 ExportMetricsServiceRequest {
116116 resource_metrics : vec ! [ TonicResourceMetrics {
117117 resource: Some ( ( & rm. resource) . into( ) ) ,
118- scope_metrics: rm. scope_metrics. iter ( ) . map( Into :: into) . collect( ) ,
118+ scope_metrics: rm. scope_metrics( ) . map( Into :: into) . collect( ) ,
119119 schema_url: rm. resource. schema_url( ) . map( Into :: into) . unwrap_or_default( ) ,
120120 } ] ,
121121 }
@@ -136,7 +136,7 @@ pub mod tonic {
136136 fn from ( sm : & SdkScopeMetrics ) -> Self {
137137 TonicScopeMetrics {
138138 scope : Some ( ( & sm. scope , None ) . into ( ) ) ,
139- metrics : sm. metrics . iter ( ) . map ( Into :: into) . collect ( ) ,
139+ metrics : sm. metrics ( ) . map ( Into :: into) . collect ( ) ,
140140 schema_url : sm
141141 . scope
142142 . schema_url ( )
@@ -208,17 +208,16 @@ pub mod tonic {
208208 fn from ( hist : & SdkHistogram < T > ) -> Self {
209209 TonicHistogram {
210210 data_points : hist
211- . data_points
212- . iter ( )
211+ . data_points ( )
213212 . map ( |dp| TonicHistogramDataPoint {
214- attributes : dp. attributes . iter ( ) . map ( Into :: into) . collect ( ) ,
213+ attributes : dp. attributes ( ) . map ( Into :: into) . collect ( ) ,
215214 start_time_unix_nano : to_nanos ( hist. start_time ) ,
216215 time_unix_nano : to_nanos ( hist. time ) ,
217216 count : dp. count ,
218217 sum : Some ( dp. sum . into_f64 ( ) ) ,
219- bucket_counts : dp. bucket_counts . clone ( ) ,
220- explicit_bounds : dp. bounds . clone ( ) ,
221- exemplars : dp. exemplars . iter ( ) . map ( Into :: into) . collect ( ) ,
218+ bucket_counts : dp. bucket_counts ( ) . collect ( ) ,
219+ explicit_bounds : dp. bounds ( ) . collect ( ) ,
220+ exemplars : dp. exemplars ( ) . map ( Into :: into) . collect ( ) ,
222221 flags : TonicDataPointFlags :: default ( ) as u32 ,
223222 min : dp. min . map ( Numeric :: into_f64) ,
224223 max : dp. max . map ( Numeric :: into_f64) ,
@@ -236,10 +235,9 @@ pub mod tonic {
236235 fn from ( hist : & SdkExponentialHistogram < T > ) -> Self {
237236 TonicExponentialHistogram {
238237 data_points : hist
239- . data_points
240- . iter ( )
238+ . data_points ( )
241239 . map ( |dp| TonicExponentialHistogramDataPoint {
242- attributes : dp. attributes . iter ( ) . map ( Into :: into) . collect ( ) ,
240+ attributes : dp. attributes ( ) . map ( Into :: into) . collect ( ) ,
243241 start_time_unix_nano : to_nanos ( hist. start_time ) ,
244242 time_unix_nano : to_nanos ( hist. time ) ,
245243 count : dp. count as u64 ,
@@ -255,7 +253,7 @@ pub mod tonic {
255253 bucket_counts : dp. negative_bucket . counts . clone ( ) ,
256254 } ) ,
257255 flags : TonicDataPointFlags :: default ( ) as u32 ,
258- exemplars : dp. exemplars . iter ( ) . map ( Into :: into) . collect ( ) ,
256+ exemplars : dp. exemplars ( ) . map ( Into :: into) . collect ( ) ,
259257 min : dp. min . map ( Numeric :: into_f64) ,
260258 max : dp. max . map ( Numeric :: into_f64) ,
261259 zero_threshold : dp. zero_threshold ,
@@ -273,13 +271,12 @@ pub mod tonic {
273271 fn from ( sum : & SdkSum < T > ) -> Self {
274272 TonicSum {
275273 data_points : sum
276- . data_points
277- . iter ( )
274+ . data_points ( )
278275 . map ( |dp| TonicNumberDataPoint {
279- attributes : dp. attributes . iter ( ) . map ( Into :: into) . collect ( ) ,
276+ attributes : dp. attributes ( ) . map ( Into :: into) . collect ( ) ,
280277 start_time_unix_nano : to_nanos ( sum. start_time ) ,
281278 time_unix_nano : to_nanos ( sum. time ) ,
282- exemplars : dp. exemplars . iter ( ) . map ( Into :: into) . collect ( ) ,
279+ exemplars : dp. exemplars ( ) . map ( Into :: into) . collect ( ) ,
283280 flags : TonicDataPointFlags :: default ( ) as u32 ,
284281 value : Some ( dp. value . into ( ) ) ,
285282 } )
@@ -297,13 +294,12 @@ pub mod tonic {
297294 fn from ( gauge : & SdkGauge < T > ) -> Self {
298295 TonicGauge {
299296 data_points : gauge
300- . data_points
301- . iter ( )
297+ . data_points ( )
302298 . map ( |dp| TonicNumberDataPoint {
303- attributes : dp. attributes . iter ( ) . map ( Into :: into) . collect ( ) ,
299+ attributes : dp. attributes ( ) . map ( Into :: into) . collect ( ) ,
304300 start_time_unix_nano : gauge. start_time . map ( to_nanos) . unwrap_or_default ( ) ,
305301 time_unix_nano : to_nanos ( gauge. time ) ,
306- exemplars : dp. exemplars . iter ( ) . map ( Into :: into) . collect ( ) ,
302+ exemplars : dp. exemplars ( ) . map ( Into :: into) . collect ( ) ,
307303 flags : TonicDataPointFlags :: default ( ) as u32 ,
308304 value : Some ( dp. value . into ( ) ) ,
309305 } )
@@ -319,8 +315,7 @@ pub mod tonic {
319315 fn from ( ex : & SdkExemplar < T > ) -> Self {
320316 TonicExemplar {
321317 filtered_attributes : ex
322- . filtered_attributes
323- . iter ( )
318+ . filtered_attributes ( )
324319 . map ( |kv| ( & kv. key , & kv. value ) . into ( ) )
325320 . collect ( ) ,
326321 time_unix_nano : to_nanos ( ex. time ) ,
0 commit comments