Skip to content

Commit

Permalink
fix broken tests
Browse files Browse the repository at this point in the history
  • Loading branch information
adryzz committed Dec 16, 2024
1 parent e1c2c65 commit c1a30ed
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions axum/src/extract/ws.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1026,19 +1026,19 @@ mod tests {
}

async fn test_echo_app<S: AsyncRead + AsyncWrite + Unpin>(mut socket: WebSocketStream<S>) {
let input = tungstenite::Message::Text("foobar".to_owned());
let input = tungstenite::Message::Text("foobar".into());
socket.send(input.clone()).await.unwrap();
let output = socket.next().await.unwrap().unwrap();
assert_eq!(input, output);

socket
.send(tungstenite::Message::Ping("ping".to_owned().into_bytes()))
.send(tungstenite::Message::Ping("ping".as_bytes().into()))
.await
.unwrap();
let output = socket.next().await.unwrap().unwrap();
assert_eq!(
output,
tungstenite::Message::Pong("ping".to_owned().into_bytes())
tungstenite::Message::Pong("ping".as_bytes().into())
);
}
}

0 comments on commit c1a30ed

Please sign in to comment.