diff --git a/actix-service/src/and_then_apply.rs b/actix-service/src/and_then_apply.rs index 96c68619..9c5fc493 100644 --- a/actix-service/src/and_then_apply.rs +++ b/actix-service/src/and_then_apply.rs @@ -108,7 +108,7 @@ where fn poll(&mut self) -> Poll { if let Some(ref mut fut) = self.fut_t { - return fut.poll().map_err(|e| e.into()); + return fut.poll(); } match self.fut_a.as_mut().expect("Bug in actix-service").poll() { diff --git a/actix-service/src/and_then_apply_fn.rs b/actix-service/src/and_then_apply_fn.rs index f6f7f266..6565226f 100644 --- a/actix-service/src/and_then_apply_fn.rs +++ b/actix-service/src/and_then_apply_fn.rs @@ -72,7 +72,7 @@ where fn poll_ready(&mut self) -> Poll<(), Self::Error> { try_ready!(self.a.poll_ready()); - self.b.get_mut().poll_ready().map_err(|e| e.into()) + self.b.get_mut().poll_ready() } fn call(&mut self, req: A::Request) -> Self::Future { @@ -123,7 +123,7 @@ where self.poll() } Ok(Async::NotReady) => Ok(Async::NotReady), - Err(err) => Err(err.into()), + Err(err) => Err(err), } } } diff --git a/actix-service/src/apply.rs b/actix-service/src/apply.rs index 8709e1ad..b682651b 100644 --- a/actix-service/src/apply.rs +++ b/actix-service/src/apply.rs @@ -78,7 +78,7 @@ where fn poll_ready(&mut self) -> Poll<(), Self::Error> { try_ready!(self.service.poll_ready()); - self.transform.poll_ready().map_err(|e| e.into()) + self.transform.poll_ready() } fn call(&mut self, req: Self::Request) -> Self::Future { diff --git a/actix-service/src/blank.rs b/actix-service/src/blank.rs index 6a385dca..ac825aa7 100644 --- a/actix-service/src/blank.rs +++ b/actix-service/src/blank.rs @@ -18,6 +18,7 @@ impl Blank { } impl Blank { + #[allow(clippy::new_ret_no_self)] pub fn new() -> Blank { Blank { _t: PhantomData } } diff --git a/actix-utils/src/inflight.rs b/actix-utils/src/inflight.rs index 41a5c43a..e714c422 100644 --- a/actix-utils/src/inflight.rs +++ b/actix-utils/src/inflight.rs @@ -61,9 +61,9 @@ where fn poll_ready(&mut self) -> Poll<(), Self::Error> { if !self.count.available() { log::trace!("InFlight limit exceeded"); - return Ok(Async::NotReady); + Ok(Async::NotReady) } else { - return Ok(Async::Ready(())); + Ok(Async::Ready(())) } } diff --git a/actix-utils/src/keepalive.rs b/actix-utils/src/keepalive.rs index db2c0472..6cd5c504 100644 --- a/actix-utils/src/keepalive.rs +++ b/actix-utils/src/keepalive.rs @@ -112,7 +112,7 @@ where } } Ok(Async::NotReady) => Ok(Async::Ready(())), - Err(_) => panic!(), + Err(_e) => panic!(), } } diff --git a/actix-utils/src/order.rs b/actix-utils/src/order.rs index b35044b6..9a901614 100644 --- a/actix-utils/src/order.rs +++ b/actix-utils/src/order.rs @@ -115,6 +115,18 @@ where } } +impl Default for InOrderService +where + S: Service, + S::Response: 'static, + S::Future: 'static, + S::Error: 'static, +{ + fn default() -> Self { + Self::new() + } +} + impl Transform for InOrderService where S: Service, diff --git a/actix-utils/src/time.rs b/actix-utils/src/time.rs index e8cfcd75..c7352406 100644 --- a/actix-utils/src/time.rs +++ b/actix-utils/src/time.rs @@ -133,7 +133,7 @@ impl SystemTimeService { /// Get current time. This function has to be called from /// future's poll method, otherwise it panics. pub fn now(&self) -> time::SystemTime { - let cur = self.0.get_ref().current.clone(); + let cur = self.0.get_ref().current; if let Some(cur) = cur { cur } else {