From 46db09428c2a38cab4daa8f272b36fb4112ff235 Mon Sep 17 00:00:00 2001 From: Douman Date: Tue, 11 Dec 2018 08:15:07 +0300 Subject: [PATCH] Prepare release 0.7.16 --- CHANGES.md | 2 +- Cargo.toml | 4 ++-- src/client/connector.rs | 4 ++-- src/client/mod.rs | 6 ++++-- src/client/pipeline.rs | 3 ++- src/client/request.rs | 3 ++- src/extractor.rs | 4 +++- src/httpmessage.rs | 3 ++- src/lib.rs | 16 +++++++--------- src/middleware/session.rs | 3 ++- src/server/http.rs | 3 ++- src/server/mod.rs | 3 ++- src/test.rs | 2 +- src/ws/mod.rs | 3 ++- 14 files changed, 34 insertions(+), 25 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index 05f831ae3..7965bc75c 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,6 +1,6 @@ # Changes -## [0.7.16] - xxxx-xx-xx +## [0.7.16] - 2018-12-11 ### Added diff --git a/Cargo.toml b/Cargo.toml index 7b8dcec35..80261110c 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "actix-web" -version = "0.7.15" +version = "0.7.16" authors = ["Nikolay Kim "] description = "Actix web is a simple, pragmatic and extremely fast web framework for Rust." readme = "README.md" @@ -61,7 +61,7 @@ flate2-rust = ["flate2/rust_backend"] cell = ["actix-net/cell"] [dependencies] -actix = "0.7.7" +actix = "0.7.9" actix-net = "0.2.2" askama_escape = "0.1.0" diff --git a/src/client/connector.rs b/src/client/connector.rs index f5affad37..1d0623023 100644 --- a/src/client/connector.rs +++ b/src/client/connector.rs @@ -3,8 +3,8 @@ use std::net::Shutdown; use std::time::{Duration, Instant}; use std::{fmt, io, mem, time}; -use actix::resolver::{Connect as ResolveConnect, Resolver, ResolverError}; -use actix::{ +use actix_inner::actors::resolver::{Connect as ResolveConnect, Resolver, ResolverError}; +use actix_inner::{ fut, Actor, ActorFuture, ActorResponse, AsyncContext, Context, ContextFutureSpawner, Handler, Message, Recipient, StreamHandler, Supervised, SystemService, WrapFuture, diff --git a/src/client/mod.rs b/src/client/mod.rs index a0713fe32..7696efa97 100644 --- a/src/client/mod.rs +++ b/src/client/mod.rs @@ -2,11 +2,12 @@ //! //! ```rust //! # extern crate actix_web; +//! # extern crate actix; //! # extern crate futures; //! # extern crate tokio; //! # use futures::Future; //! # use std::process; -//! use actix_web::{actix, client}; +//! use actix_web::client; //! //! fn main() { //! actix::run( @@ -61,12 +62,13 @@ impl ResponseError for SendRequestError { /// /// ```rust /// # extern crate actix_web; +/// # extern crate actix; /// # extern crate futures; /// # extern crate tokio; /// # extern crate env_logger; /// # use futures::Future; /// # use std::process; -/// use actix_web::{actix, client}; +/// use actix_web::client; /// /// fn main() { /// actix::run( diff --git a/src/client/pipeline.rs b/src/client/pipeline.rs index 394b7a6cd..1dbd2e171 100644 --- a/src/client/pipeline.rs +++ b/src/client/pipeline.rs @@ -6,7 +6,8 @@ use std::time::{Duration, Instant}; use std::{io, mem}; use tokio_timer::Delay; -use actix::{Addr, Request, SystemService}; +use actix_inner::dev::Request; +use actix::{Addr, SystemService}; use super::{ ClientConnector, ClientConnectorError, ClientRequest, ClientResponse, Connect, diff --git a/src/client/request.rs b/src/client/request.rs index 71da8f74d..ad08ad135 100644 --- a/src/client/request.rs +++ b/src/client/request.rs @@ -27,11 +27,12 @@ use httprequest::HttpRequest; /// /// ```rust /// # extern crate actix_web; +/// # extern crate actix; /// # extern crate futures; /// # extern crate tokio; /// # use futures::Future; /// # use std::process; -/// use actix_web::{actix, client}; +/// use actix_web::client; /// /// fn main() { /// actix::run( diff --git a/src/extractor.rs b/src/extractor.rs index 6f55487bc..3c64de9e1 100644 --- a/src/extractor.rs +++ b/src/extractor.rs @@ -751,7 +751,6 @@ pub enum EitherCollisionStrategy { PreferB, /// Return result of the faster, error of the slower if both fail FastestSuccessful, - /// Return error if both succeed, return error of A if both fail ErrorA, /// Return error if both succeed, return error of B if both fail @@ -764,6 +763,9 @@ impl Default for EitherCollisionStrategy { } } +///Determines Either extractor configuration +/// +///By default `EitherCollisionStrategy::FastestSuccessful` is used. pub struct EitherConfig where A: FromRequest, B: FromRequest { a: A::Config, b: B::Config, diff --git a/src/httpmessage.rs b/src/httpmessage.rs index 60f77b07e..e96dce48c 100644 --- a/src/httpmessage.rs +++ b/src/httpmessage.rs @@ -213,9 +213,10 @@ pub trait HttpMessage: Sized { /// # extern crate actix_web; /// # extern crate env_logger; /// # extern crate futures; + /// # extern crate actix; /// # use std::str; /// # use actix_web::*; - /// # use actix_web::actix::fut::FinishStream; + /// # use actix::FinishStream; /// # use futures::{Future, Stream}; /// # use futures::future::{ok, result, Either}; /// fn index(mut req: HttpRequest) -> Box> { diff --git a/src/lib.rs b/src/lib.rs index f8326886f..21515051e 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -217,14 +217,12 @@ pub use server::Request; pub mod actix { //! Re-exports [actix's](https://docs.rs/actix/) prelude - - extern crate actix; - pub use self::actix::actors::resolver; - pub use self::actix::actors::signal; - pub use self::actix::fut; - pub use self::actix::msgs; - pub use self::actix::prelude::*; - pub use self::actix::{run, spawn}; + pub use super::actix_inner::actors::resolver; + pub use super::actix_inner::actors::signal; + pub use super::actix_inner::fut; + pub use super::actix_inner::msgs; + pub use super::actix_inner::prelude::*; + pub use super::actix_inner::{run, spawn}; } #[cfg(feature = "openssl")] @@ -255,7 +253,7 @@ pub mod dev { pub use body::BodyStream; pub use context::Drain; - pub use extractor::{FormConfig, PayloadConfig, QueryConfig, PathConfig}; + pub use extractor::{FormConfig, PayloadConfig, QueryConfig, PathConfig, EitherConfig, EitherCollisionStrategy}; pub use handler::{AsyncResult, Handler}; pub use httpmessage::{MessageBody, Readlines, UrlEncoded}; pub use httpresponse::HttpResponseBuilder; diff --git a/src/middleware/session.rs b/src/middleware/session.rs index e8b0e5558..0271a13f8 100644 --- a/src/middleware/session.rs +++ b/src/middleware/session.rs @@ -33,7 +33,8 @@ //! //! ```rust //! # extern crate actix_web; -//! use actix_web::{actix, server, App, HttpRequest, Result}; +//! # extern crate actix; +//! use actix_web::{server, App, HttpRequest, Result}; //! use actix_web::middleware::session::{RequestSession, SessionStorage, CookieSessionBackend}; //! //! fn index(req: HttpRequest) -> Result<&'static str> { diff --git a/src/server/http.rs b/src/server/http.rs index 0bec8be3f..76049981f 100644 --- a/src/server/http.rs +++ b/src/server/http.rs @@ -457,7 +457,8 @@ impl H + Send + Clone> HttpServer { /// /// ```rust /// extern crate actix_web; - /// use actix_web::{actix, server, App, HttpResponse}; + /// extern crate actix; + /// use actix_web::{server, App, HttpResponse}; /// /// fn main() { /// let sys = actix::System::new("example"); // <- create Actix system diff --git a/src/server/mod.rs b/src/server/mod.rs index 0a16f26b9..b84986047 100644 --- a/src/server/mod.rs +++ b/src/server/mod.rs @@ -166,7 +166,8 @@ const HW_BUFFER_SIZE: usize = 32_768; /// /// ```rust /// # extern crate actix_web; -/// use actix_web::{actix, server, App, HttpResponse}; +/// # extern crate actix; +/// use actix_web::{server, App, HttpResponse}; /// /// fn main() { /// let sys = actix::System::new("example"); // <- create Actix system diff --git a/src/test.rs b/src/test.rs index d0cfb255a..d543937c0 100644 --- a/src/test.rs +++ b/src/test.rs @@ -4,7 +4,7 @@ use std::str::FromStr; use std::sync::mpsc; use std::{net, thread}; -use actix_inner::{Actor, Addr, System}; +use actix::{Actor, Addr, System}; use cookie::Cookie; use futures::Future; diff --git a/src/ws/mod.rs b/src/ws/mod.rs index c16f8d6d2..b0942c0d3 100644 --- a/src/ws/mod.rs +++ b/src/ws/mod.rs @@ -8,7 +8,8 @@ //! //! ```rust //! # extern crate actix_web; -//! # use actix_web::actix::*; +//! # extern crate actix; +//! # use actix::prelude::*; //! # use actix_web::*; //! use actix_web::{ws, HttpRequest, HttpResponse}; //!