1
0
mirror of https://github.com/fafhrd91/actix-web synced 2025-06-26 15:07:42 +02:00

use ByteString as container for websocket text message (#1864)

This commit is contained in:
Rob Ede
2021-01-04 11:27:32 +00:00
committed by GitHub
parent 36aee18c64
commit 7d632d0b7b
13 changed files with 131 additions and 102 deletions

View File

@ -38,10 +38,7 @@ async fn test_simple() {
// client service
let mut framed = srv.ws().await.unwrap();
framed
.send(ws::Message::Text("text".to_string()))
.await
.unwrap();
framed.send(ws::Message::Text("text".into())).await.unwrap();
let item = framed.next().await.unwrap().unwrap();
assert_eq!(item, ws::Frame::Text(Bytes::from_static(b"text")));