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

change rustfmt line width to 96

This commit is contained in:
Rob Ede
2021-02-11 23:03:17 +00:00
parent c1af5089b9
commit 31d9ed81c5
56 changed files with 463 additions and 756 deletions

View File

@ -11,11 +11,7 @@ impl Actor for Ws {
}
impl StreamHandler<Result<ws::Message, ws::ProtocolError>> for Ws {
fn handle(
&mut self,
msg: Result<ws::Message, ws::ProtocolError>,
ctx: &mut Self::Context,
) {
fn handle(&mut self, msg: Result<ws::Message, ws::ProtocolError>, ctx: &mut Self::Context) {
match msg.unwrap() {
ws::Message::Ping(msg) => ctx.pong(&msg),
ws::Message::Text(text) => ctx.text(text),
@ -30,9 +26,7 @@ impl StreamHandler<Result<ws::Message, ws::ProtocolError>> for Ws {
async fn test_simple() {
let mut srv = test::start(|| {
App::new().service(web::resource("/").to(
|req: HttpRequest, stream: web::Payload| async move {
ws::start(Ws, &req, stream)
},
|req: HttpRequest, stream: web::Payload| async move { ws::start(Ws, &req, stream) },
))
});