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

update actix-server dep

This commit is contained in:
Nikolay Kim
2019-03-12 16:55:16 -07:00
parent 409888fcd5
commit 402a40ab27
5 changed files with 14 additions and 9 deletions

View File

@ -7,6 +7,7 @@ use actix_service::{fn_service, NewService};
use actix_utils::framed::IntoFramed;
use actix_utils::stream::TakeItem;
use futures::Future;
use tokio_tcp::TcpStream;
fn main() -> io::Result<()> {
env::set_var("RUST_LOG", "framed_hello=info");
@ -14,7 +15,7 @@ fn main() -> io::Result<()> {
Server::build()
.bind("framed_hello", "127.0.0.1:8080", || {
fn_service(|io: Io<_>| Ok(io.into_parts().0))
fn_service(|io: Io<TcpStream>| Ok(io.into_parts().0))
.and_then(IntoFramed::new(|| h1::Codec::new(ServiceConfig::default())))
.and_then(TakeItem::new().map_err(|_| ()))
.and_then(|(_req, _framed): (_, Framed<_, _>)| {