diff --git a/actix-cors/CHANGES.md b/actix-cors/CHANGES.md index 8022ea4e8..8d2a209d0 100644 --- a/actix-cors/CHANGES.md +++ b/actix-cors/CHANGES.md @@ -1,5 +1,10 @@ # Changes +## [0.3.0-alpha.1] - 2020-03-11 + +* Minimize `futures-*` dependencies +* Update `actix-web` dependency to 3.0.0-alpha.1 + ## [0.2.0] - 2019-12-20 * Release diff --git a/actix-cors/Cargo.toml b/actix-cors/Cargo.toml index c92422ddf..c2b461b89 100644 --- a/actix-cors/Cargo.toml +++ b/actix-cors/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "actix-cors" -version = "0.2.0" +version = "0.3.0-alpha.1" authors = ["Nikolay Kim "] description = "Cross-origin resource sharing (CORS) for actix-web applications." readme = "README.md" @@ -16,10 +16,10 @@ name = "actix_cors" path = "src/lib.rs" [dependencies] -actix-web = "2.0.0" +actix-web = "3.0.0-alpha.1" actix-service = "1.0.1" derive_more = "0.99.2" -futures = "0.3.1" +futures-util = { version = "0.3.4", default-features = false } [dev-dependencies] actix-rt = "1.0.0" diff --git a/actix-cors/src/lib.rs b/actix-cors/src/lib.rs index 579a067b3..ca6cceb55 100644 --- a/actix-cors/src/lib.rs +++ b/actix-cors/src/lib.rs @@ -52,7 +52,7 @@ use actix_web::http::header::{self, HeaderName, HeaderValue}; use actix_web::http::{self, Error as HttpError, Method, StatusCode, Uri}; use actix_web::HttpResponse; use derive_more::Display; -use futures::future::{ok, Either, FutureExt, LocalBoxFuture, Ready}; +use futures_util::future::{ok, Either, FutureExt, LocalBoxFuture, Ready}; /// A set of errors that can occur during processing CORS #[derive(Debug, Display)] @@ -776,10 +776,8 @@ where if let Some(origin) = inner.access_control_allow_origin(res.request().head()) { - res.headers_mut().insert( - header::ACCESS_CONTROL_ALLOW_ORIGIN, - origin, - ); + res.headers_mut() + .insert(header::ACCESS_CONTROL_ALLOW_ORIGIN, origin); }; if let Some(ref expose) = inner.expose_hdrs {