Remove unnecessary parentheses in chat example (#2732)

This commit is contained in:
src_resources 2024-05-07 18:33:17 +08:00 committed by GitHub
parent 87b86a7066
commit 8d0c5c05eb
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -130,8 +130,8 @@ async fn websocket(stream: WebSocket, state: Arc<AppState>) {
// If any one of the tasks run to completion, we abort the other. // If any one of the tasks run to completion, we abort the other.
tokio::select! { tokio::select! {
_ = (&mut send_task) => recv_task.abort(), _ = &mut send_task => recv_task.abort(),
_ = (&mut recv_task) => send_task.abort(), _ = &mut recv_task => send_task.abort(),
}; };
// Send "user left" message (similar to "joined" above). // Send "user left" message (similar to "joined" above).