diff --git a/awc/src/lib.rs b/awc/src/lib.rs index 7bbe42195..d6cea6ded 100644 --- a/awc/src/lib.rs +++ b/awc/src/lib.rs @@ -52,7 +52,6 @@ use self::connect::{Connect, ConnectorWrapper}; /// An HTTP Client /// /// ```rust -/// # use futures::future::{Future, lazy}; /// use actix_rt::System; /// use awc::Client; /// diff --git a/awc/src/request.rs b/awc/src/request.rs index 5181f1905..c6b09e95c 100644 --- a/awc/src/request.rs +++ b/awc/src/request.rs @@ -37,7 +37,6 @@ const HTTPS_ENCODING: &str = "gzip, deflate"; /// builder-like pattern. /// /// ```rust -/// use futures::future::{Future, lazy}; /// use actix_rt::System; /// /// fn main() { @@ -310,7 +309,6 @@ impl ClientRequest { /// /// ```rust /// # use actix_rt::System; - /// # use futures::future::{lazy, Future}; /// fn main() { /// System::new("test").block_on(async { /// awc::Client::new().get("https://www.rust-lang.org") diff --git a/src/app.rs b/src/app.rs index 288256604..4c2b34628 100644 --- a/src/app.rs +++ b/src/app.rs @@ -343,7 +343,6 @@ where /// /// ```rust /// use actix_service::Service; - /// # use futures::Future; /// use actix_web::{middleware, web, App}; /// use actix_web::http::{header::CONTENT_TYPE, HeaderValue}; /// @@ -402,7 +401,6 @@ where /// /// ```rust /// use actix_service::Service; - /// # use futures::Future; /// use actix_web::{web, App}; /// use actix_web::http::{header::CONTENT_TYPE, HeaderValue}; /// diff --git a/src/lib.rs b/src/lib.rs index 1ae81505a..3cd1f78d6 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -171,7 +171,6 @@ pub mod client { //! An HTTP Client //! //! ```rust - //! # use futures::future::{Future, lazy}; //! use actix_rt::System; //! use actix_web::client::Client; //! diff --git a/src/resource.rs b/src/resource.rs index 904bc124f..a1c0d396b 100644 --- a/src/resource.rs +++ b/src/resource.rs @@ -244,7 +244,6 @@ where /// /// ```rust /// use actix_web::*; - /// use futures::future::{ok, Future}; /// /// async fn index(req: HttpRequest) -> Result { /// Ok(HttpResponse::Ok().finish()) @@ -257,7 +256,6 @@ where /// /// ```rust /// # use actix_web::*; - /// # use futures::future::Future; /// # async fn index(req: HttpRequest) -> Result { /// # unimplemented!() /// # } @@ -326,7 +324,6 @@ where /// /// ```rust /// use actix_service::Service; - /// # use futures::Future; /// use actix_web::{web, App}; /// use actix_web::http::{header::CONTENT_TYPE, HeaderValue}; /// diff --git a/src/responder.rs b/src/responder.rs index 2bb422b2e..3f1471721 100644 --- a/src/responder.rs +++ b/src/responder.rs @@ -342,7 +342,6 @@ impl Future for CustomResponderFut { /// Combines two different responder types into a single type /// /// ```rust -/// # use futures::future::{ok, Future}; /// use actix_web::{Either, Error, HttpResponse}; /// /// type RegisterResult = Either>; diff --git a/src/route.rs b/src/route.rs index 9b2c4390c..51305d840 100644 --- a/src/route.rs +++ b/src/route.rs @@ -238,9 +238,7 @@ impl Route { /// This method has to be used if your handler function returns `impl Future<>` /// /// ```rust - /// # use futures::future::ok; /// use actix_web::{web, App, Error}; - /// use futures::Future; /// use serde_derive::Deserialize; /// /// #[derive(Deserialize)] diff --git a/src/scope.rs b/src/scope.rs index 2e59352d6..f5ffe05fa 100644 --- a/src/scope.rs +++ b/src/scope.rs @@ -353,7 +353,6 @@ where /// /// ```rust /// use actix_service::Service; - /// # use futures::Future; /// use actix_web::{web, App}; /// use actix_web::http::{header::CONTENT_TYPE, HeaderValue}; /// diff --git a/src/service.rs b/src/service.rs index 9c4e6b4aa..39540b067 100644 --- a/src/service.rs +++ b/src/service.rs @@ -449,11 +449,10 @@ impl WebService { /// Add match guard to a web service. /// /// ```rust - /// use futures::future::{ok, Ready}; /// use actix_web::{web, guard, dev, App, Error, HttpResponse}; /// - /// fn index(req: dev::ServiceRequest) -> Ready> { - /// ok(req.into_response(HttpResponse::Ok().finish())) + /// async fn index(req: dev::ServiceRequest) -> Result { + /// Ok(req.into_response(HttpResponse::Ok().finish())) /// } /// /// fn main() { diff --git a/src/web.rs b/src/web.rs index 3d716dc23..099e26627 100644 --- a/src/web.rs +++ b/src/web.rs @@ -254,7 +254,6 @@ where /// Create a new route and add async handler. /// /// ```rust -/// # use futures::future::{ok, Future}; /// use actix_web::{web, App, HttpResponse, Error}; /// /// async fn index() -> Result { @@ -278,12 +277,10 @@ where /// Create raw service for a specific path. /// /// ```rust -/// # extern crate actix_web; -/// use futures::future::{ok, Ready}; /// use actix_web::{dev, web, guard, App, Error, HttpResponse}; /// -/// fn my_service(req: dev::ServiceRequest) -> Ready> { -/// ok(req.into_response(HttpResponse::Ok().finish())) +/// async fn my_service(req: dev::ServiceRequest) -> Result { +/// Ok(req.into_response(HttpResponse::Ok().finish())) /// } /// /// fn main() {