diff --git a/examples/async-handlers/src/async_stream.rs b/examples/async-handlers/src/async_stream.rs index ddc6ad6..ddf41f4 100644 --- a/examples/async-handlers/src/async_stream.rs +++ b/examples/async-handlers/src/async_stream.rs @@ -6,7 +6,7 @@ fn is_error() -> bool { use actix_web::{error, Error, HttpResponse}; use futures::future::{result, Future}; -fn index() -> Result>, Error> { +fn index() -> Result>, Error> { if is_error() { Err(error::ErrorBadRequest("bad request")) } else { diff --git a/examples/async-handlers/src/main.rs b/examples/async-handlers/src/main.rs index 05a4ff4..ef4e1a5 100644 --- a/examples/async-handlers/src/main.rs +++ b/examples/async-handlers/src/main.rs @@ -4,13 +4,13 @@ pub mod stream; use actix_web::{Error, HttpResponse}; use futures::future::{ok, Future}; -fn index() -> Box> { +fn index() -> Box> { Box::new(ok::<_, Error>( HttpResponse::Ok().content_type("text/html").body("Hello!"), )) } -fn index2() -> Box> { +fn index2() -> Box> { Box::new(ok::<_, Error>("Welcome!")) } diff --git a/examples/either/src/main.rs b/examples/either/src/main.rs index 3c6af05..75837fe 100644 --- a/examples/either/src/main.rs +++ b/examples/either/src/main.rs @@ -3,7 +3,7 @@ use actix_web::{Either, Error, HttpResponse}; use futures::future::{ok, Future}; type RegisterResult = - Either>>; + Either>>; fn index() -> RegisterResult { if is_a_variant() { diff --git a/examples/middleware/src/main.rs b/examples/middleware/src/main.rs index 22ed711..91b7d25 100644 --- a/examples/middleware/src/main.rs +++ b/examples/middleware/src/main.rs @@ -49,7 +49,7 @@ where type Request = ServiceRequest; type Response = ServiceResponse; type Error = Error; - type Future = Box>; + type Future = Box>; fn poll_ready(&mut self) -> Poll<(), Self::Error> { self.service.poll_ready() diff --git a/examples/requests/src/streaming.rs b/examples/requests/src/streaming.rs index a219d4a..9f4ab33 100644 --- a/examples/requests/src/streaming.rs +++ b/examples/requests/src/streaming.rs @@ -2,7 +2,7 @@ use actix_web::{error, web, Error, HttpResponse}; use futures::{future::result, Future, Stream}; -pub fn index(payload: web::Payload) -> Box> { +pub fn index(payload: web::Payload) -> Box> { Box::new( payload .from_err()