diff --git a/examples/chat/src/main.rs b/examples/chat/src/main.rs index 02e3bdc0..149ffe0d 100644 --- a/examples/chat/src/main.rs +++ b/examples/chat/src/main.rs @@ -130,8 +130,8 @@ async fn websocket(stream: WebSocket, state: Arc) { // If any one of the tasks run to completion, we abort the other. tokio::select! { - _ = (&mut send_task) => recv_task.abort(), - _ = (&mut recv_task) => send_task.abort(), + _ = &mut send_task => recv_task.abort(), + _ = &mut recv_task => send_task.abort(), }; // Send "user left" message (similar to "joined" above).