@@ -104,12 +104,12 @@ mod skip {
104
104
105
105
let invocations = serve ( wrpc, Component ) . await . unwrap ( ) ;
106
106
let invocations = std:: thread:: spawn ( || invocations) . join ( ) . unwrap ( ) ;
107
- invocations . into_iter ( ) . for_each ( | ( instance, name, st) | {
107
+ for ( instance, name, st) in invocations {
108
108
wit_bindgen_wrpc:: tokio:: spawn ( async move {
109
109
eprintln ! ( "serving {instance} {name}" ) ;
110
110
st. try_collect :: < Vec < _ > > ( ) . await . unwrap ( ) ;
111
111
} ) ;
112
- } )
112
+ }
113
113
}
114
114
}
115
115
@@ -175,12 +175,12 @@ mod symbol_does_not_conflict {
175
175
176
176
let invocations = serve ( wrpc, Component ) . await . unwrap ( ) ;
177
177
let invocations = std:: thread:: spawn ( || invocations) . join ( ) . unwrap ( ) ;
178
- invocations . into_iter ( ) . for_each ( | ( instance, name, st) | {
178
+ for ( instance, name, st) in invocations {
179
179
wit_bindgen_wrpc:: tokio:: spawn ( async move {
180
180
eprintln ! ( "serving {instance} {name}" ) ;
181
181
st. try_collect :: < Vec < _ > > ( ) . await . unwrap ( ) ;
182
182
} ) ;
183
- } )
183
+ }
184
184
}
185
185
}
186
186
@@ -210,12 +210,12 @@ mod alternative_bitflags_path {
210
210
211
211
let invocations = serve ( wrpc, Component ) . await . unwrap ( ) ;
212
212
let invocations = std:: thread:: spawn ( || invocations) . join ( ) . unwrap ( ) ;
213
- invocations . into_iter ( ) . for_each ( | ( instance, name, st) | {
213
+ for ( instance, name, st) in invocations {
214
214
wit_bindgen_wrpc:: tokio:: spawn ( async move {
215
215
eprintln ! ( "serving {instance} {name}" ) ;
216
216
st. try_collect :: < Vec < _ > > ( ) . await . unwrap ( ) ;
217
217
} ) ;
218
- } )
218
+ }
219
219
}
220
220
221
221
impl < Ctx : Send > Handler < Ctx > for Component {
@@ -276,12 +276,12 @@ mod owned_resource_deref_mut {
276
276
277
277
let invocations = serve ( wrpc, Component ) . await . unwrap ( ) ;
278
278
let invocations = std:: thread:: spawn ( || invocations) . join ( ) . unwrap ( ) ;
279
- invocations . into_iter ( ) . for_each ( | ( instance, name, st) | {
279
+ for ( instance, name, st) in invocations {
280
280
wit_bindgen_wrpc:: tokio:: spawn ( async move {
281
281
eprintln ! ( "serving {instance} {name}" ) ;
282
282
st. try_collect :: < Vec < _ > > ( ) . await . unwrap ( ) ;
283
283
} ) ;
284
- } )
284
+ }
285
285
}
286
286
}
287
287
@@ -324,12 +324,12 @@ mod package_with_versions {
324
324
325
325
let invocations = serve ( wrpc, Component ) . await . unwrap ( ) ;
326
326
let invocations = std:: thread:: spawn ( || invocations) . join ( ) . unwrap ( ) ;
327
- invocations . into_iter ( ) . for_each ( | ( instance, name, st) | {
327
+ for ( instance, name, st) in invocations {
328
328
wit_bindgen_wrpc:: tokio:: spawn ( async move {
329
329
eprintln ! ( "serving {instance} {name}" ) ;
330
330
st. try_collect :: < Vec < _ > > ( ) . await . unwrap ( ) ;
331
331
} ) ;
332
- } )
332
+ }
333
333
}
334
334
}
335
335
@@ -384,12 +384,12 @@ mod custom_derives {
384
384
385
385
let invocations = serve ( wrpc, Component ) . await . unwrap ( ) ;
386
386
let invocations = std:: thread:: spawn ( || invocations) . join ( ) . unwrap ( ) ;
387
- invocations . into_iter ( ) . for_each ( | ( instance, name, st) | {
387
+ for ( instance, name, st) in invocations {
388
388
wit_bindgen_wrpc:: tokio:: spawn ( async move {
389
389
eprintln ! ( "serving {instance} {name}" ) ;
390
390
st. try_collect :: < Vec < _ > > ( ) . await . unwrap ( ) ;
391
391
} ) ;
392
- } )
392
+ }
393
393
}
394
394
}
395
395
@@ -640,12 +640,12 @@ mod interface_export_example {
640
640
641
641
let invocations = serve ( wrpc, MyComponent ) . await . unwrap ( ) ;
642
642
let invocations = std:: thread:: spawn ( || invocations) . join ( ) . unwrap ( ) ;
643
- invocations . into_iter ( ) . for_each ( | ( instance, name, st) | {
643
+ for ( instance, name, st) in invocations {
644
644
wit_bindgen_wrpc:: tokio:: spawn ( async move {
645
645
eprintln ! ( "serving {instance} {name}" ) ;
646
646
st. try_collect :: < Vec < _ > > ( ) . await . unwrap ( ) ;
647
647
} ) ;
648
- } )
648
+ }
649
649
}
650
650
}
651
651
#[ allow( unused) ]
@@ -722,7 +722,7 @@ mod resource_example {
722
722
if level as u32 <= * logger. level . read ( ) . unwrap ( ) as u32 {
723
723
let mut contents = logger. contents . write ( ) . unwrap ( ) ;
724
724
contents. push_str ( & msg) ;
725
- contents. push_str ( " \n " ) ;
725
+ contents. push ( '\n' ) ;
726
726
}
727
727
Ok ( ( ) )
728
728
}
@@ -733,7 +733,7 @@ mod resource_example {
733
733
let loggers = self . loggers . read ( ) . unwrap ( ) ;
734
734
let logger = loggers. get ( i) . context ( "invalid resource handle" ) ?;
735
735
let level = logger. level . read ( ) . unwrap ( ) ;
736
- Ok ( level. clone ( ) )
736
+ Ok ( * level)
737
737
}
738
738
739
739
async fn set_level (
@@ -756,12 +756,12 @@ mod resource_example {
756
756
757
757
let invocations = serve ( wrpc, MyComponent :: default ( ) ) . await . unwrap ( ) ;
758
758
let invocations = std:: thread:: spawn ( || invocations) . join ( ) . unwrap ( ) ;
759
- invocations . into_iter ( ) . for_each ( | ( instance, name, st) | {
759
+ for ( instance, name, st) in invocations {
760
760
tokio:: spawn ( async move {
761
761
eprintln ! ( "serving {instance} {name}" ) ;
762
762
st. try_collect :: < Vec < _ > > ( ) . await . unwrap ( ) ;
763
763
} ) ;
764
- } )
764
+ }
765
765
}
766
766
}
767
767
0 commit comments