diff --git a/actix-service/src/from_err.rs b/actix-service/src/from_err.rs index 55b560f1..9d624452 100644 --- a/actix-service/src/from_err.rs +++ b/actix-service/src/from_err.rs @@ -47,7 +47,7 @@ where type Future = FromErrFuture; fn poll_ready(&mut self) -> Poll<(), E> { - Ok(self.service.poll_ready().map_err(E::from)?) + self.service.poll_ready().map_err(E::from) } fn call(&mut self, req: Request) -> Self::Future { diff --git a/actix-utils/src/framed.rs b/actix-utils/src/framed.rs index 47c6ed99..40444f92 100644 --- a/actix-utils/src/framed.rs +++ b/actix-utils/src/framed.rs @@ -210,7 +210,7 @@ where ::Item: 'static, ::Error: std::fmt::Debug, { - fn poll_service(&mut self) -> bool { + fn poll_read(&mut self) -> bool { loop { match self.service.poll_ready() { Ok(Async::Ready(_)) => loop { @@ -246,8 +246,8 @@ where } } - /// write to sink - fn poll_response(&mut self) -> bool { + /// write to framed object + fn poll_write(&mut self) -> bool { let inner = self.inner.get_mut(); loop { while !self.framed.is_write_buf_full() { @@ -354,7 +354,7 @@ where fn poll(&mut self) -> Poll { match mem::replace(&mut self.state, TransportState::Processing) { TransportState::Processing => { - if self.poll_service() || self.poll_response() { + if self.poll_read() || self.poll_write() { self.poll() } else { Ok(Async::NotReady) @@ -362,7 +362,7 @@ where } TransportState::Error(err) => { if self.framed.is_write_buf_empty() - || (self.poll_response() || self.framed.is_write_buf_empty()) + || (self.poll_write() || self.framed.is_write_buf_empty()) { Err(err) } else {