)).unzip::<_,_,Vec<_>,Vec<_>>();
let all_clients = izip!(
- ics.into_iter(),
+ ics.iter(),
client_handles_send,
- client_handles_recv,
- ).map(|(ic, web_send, web_recv)| {
- let r = (ic.link.client,
- Client {
- ic: ic.clone(),
- web: web_send,
- });
+ ).map(|(ic, web_send)| {
+ (ic.link.client,
+ Client {
+ ic: ic.clone(),
+ web: web_send,
+ })
+ }).collect();
+ for (ic, web_recv) in izip!(
+ ics.into_iter(),
+ client_handles_recv,
+ ) {
let ic_ = ic.clone();
tasks.push((tokio::spawn(async move {
run_client(ic_, web_recv).await.void_unwrap_err()
}), format!("client {}", &ic)));
+ }
- r
- }).collect();
let global = Arc::new(Global {
config: global_config,
all_clients,