Making Arc clones more explicit.
This commit is contained in:
@@ -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
@@ -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)));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user