1
0
mirror of https://github.com/fafhrd91/actix-web synced 2024-11-27 17:52:56 +01:00

upgrade actix min version

This commit is contained in:
Nikolay Kim 2017-12-20 11:37:27 -08:00
parent 7fc7d6e17a
commit e05596b65d
3 changed files with 5 additions and 5 deletions

View File

@ -73,7 +73,7 @@ tokio-tls = { version="0.1", optional = true }
tokio-openssl = { version="0.1", optional = true }
[dependencies.actix]
version = "^0.3.1"
version = "^0.3.4"
default-features = false
features = []

View File

@ -10,5 +10,5 @@ path = "src/main.rs"
[dependencies]
env_logger = "*"
futures = "0.1"
actix = "^0.3.1"
actix = "^0.3.4"
actix-web = { git = "https://github.com/actix/actix-web.git" }

View File

@ -4,6 +4,7 @@ extern crate actix_web;
extern crate env_logger;
extern crate futures;
use actix::*;
use actix_web::*;
use futures::{Future, Stream};
use futures::future::{result, Either};
@ -28,7 +29,7 @@ fn index(mut req: HttpRequest) -> Box<Future<Item=HttpResponse, Error=Error>>
.map(|chunk| {
println!("-- CHUNK: \n{}",
std::str::from_utf8(&chunk).unwrap());})
.fold((), |_, _| result::<_, Error>(Ok(()))))
.finish())
},
multipart::MultipartItem::Nested(mp) => {
// Or item could be nested Multipart stream
@ -36,8 +37,7 @@ fn index(mut req: HttpRequest) -> Box<Future<Item=HttpResponse, Error=Error>>
}
}
})
// wait until stream finishes
.fold((), |_, _| result::<_, Error>(Ok(())))
.finish() // <- Stream::finish() combinator from actix
.map(|_| httpcodes::HTTPOk.response())
)
}