1
0
mirror of https://github.com/fafhrd91/actix-web synced 2025-06-25 22:49:21 +02:00

rename framed App

This commit is contained in:
Nikolay Kim
2019-04-10 18:08:28 -07:00
parent 8dc4a88aa6
commit 7cd59c38d3
4 changed files with 56 additions and 87 deletions

View File

@ -6,7 +6,7 @@ use bytes::{Bytes, BytesMut};
use futures::future::{self, ok};
use futures::{Future, Sink, Stream};
use actix_framed::{App, FramedRequest, FramedRoute};
use actix_framed::{FramedApp, FramedRequest, FramedRoute};
fn ws_service<T: AsyncRead + AsyncWrite>(
req: FramedRequest<T>,
@ -40,7 +40,9 @@ fn service(msg: ws::Frame) -> impl Future<Item = ws::Message, Error = Error> {
fn test_simple() {
let mut srv = TestServer::new(|| {
HttpService::build()
.upgrade(App::new().service(FramedRoute::get("/index.html").to(ws_service)))
.upgrade(
FramedApp::new().service(FramedRoute::get("/index.html").to(ws_service)),
)
.finish(|_| future::ok::<_, Error>(Response::NotFound()))
});