How can I use a moved value after use it on stream
async fn socket(mut ws: WebSocket, state: Users) { tokio::spawn(async move { while let Some(msg) = reader.recv().await{ println!(“message for user: {:?}”, msg); ws.send(msg).await.unwrap(); }; }); while let Some(msg) = ws.recv().await{ // not matter } } I need to use the ws value several times, once in a stream (tokio::spawn) and once in a loop, but the […]