Making Arc clones more explicit.

This commit is contained in:
Dave Hrycyszyn
2020-04-17 10:33:54 +01:00
parent bf2ff5cd78
commit f8b2900698
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -35,7 +35,7 @@ pub async fn handle_connection(
while let Some(msg) = ws_stream.next().await {
let msg = msg?;
if msg.is_binary() {
mixnet_client::forward_to_mixnode(msg.into_data(), client_ref.clone()).await;
mixnet_client::forward_to_mixnode(msg.into_data(), Arc::clone(&client_ref)).await;
}
}
Ok(())
+1 -1
View File
@@ -48,7 +48,7 @@ async fn main() {
.expect("connected streams should have a peer address");
info!("Peer address: {}", peer);
tokio::spawn(accept_connection(peer, stream, client_ref.clone()));
tokio::spawn(accept_connection(peer, stream, Arc::clone(&client_ref)));
}
}