From e05596b65d9b4de8a2c2fad6e1bd5bdea8a9c5d2 Mon Sep 17 00:00:00 2001 From: Nikolay Kim Date: Wed, 20 Dec 2017 11:37:27 -0800 Subject: [PATCH] upgrade actix min version --- Cargo.toml | 2 +- examples/multipart/Cargo.toml | 2 +- examples/multipart/src/main.rs | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 5d80682d..e6190d3f 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -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 = [] diff --git a/examples/multipart/Cargo.toml b/examples/multipart/Cargo.toml index bfe89f82..03ab6529 100644 --- a/examples/multipart/Cargo.toml +++ b/examples/multipart/Cargo.toml @@ -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" } diff --git a/examples/multipart/src/main.rs b/examples/multipart/src/main.rs index b4ed9878..afe3a3f8 100644 --- a/examples/multipart/src/main.rs +++ b/examples/multipart/src/main.rs @@ -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> .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> } } }) - // wait until stream finishes - .fold((), |_, _| result::<_, Error>(Ok(()))) + .finish() // <- Stream::finish() combinator from actix .map(|_| httpcodes::HTTPOk.response()) ) }