1
0
mirror of https://github.com/fafhrd91/actix-net synced 2024-11-24 00:01:11 +01:00

better naming

This commit is contained in:
Nikolay Kim 2019-02-01 14:48:09 -08:00
parent cedba24a36
commit 132be0baa1
2 changed files with 6 additions and 6 deletions

View File

@ -47,7 +47,7 @@ where
type Future = FromErrFuture<A, E, Request>;
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 {

View File

@ -210,7 +210,7 @@ where
<U as Encoder>::Item: 'static,
<U as Encoder>::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<Self::Item, Self::Error> {
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 {