Clarify some docs and fix some dumb code.

This commit is contained in:
Tim Kuehn
2016-11-05 15:43:31 -07:00
parent b638f45d27
commit a30e929b63
2 changed files with 3 additions and 5 deletions

View File

@@ -15,7 +15,7 @@ use tokio_core::reactor;
use tokio_proto::easy::{EasyClient, EasyResponse, multiplex};
use tokio_service::Service;
/// A client `Service` that writes and reads bytes.
/// A client that impls `tokio_service::Service` that writes and reads bytes.
///
/// Typically, this would be combined with a serialization pre-processing step
/// and a deserialization post-processing step.
@@ -137,10 +137,7 @@ pub mod future {
type Error = io::Error;
fn poll(&mut self) -> futures::Poll<Self::Item, Self::Error> {
match self.inner.poll()? {
Async::Ready(client) => Ok(Async::Ready(client)),
Async::NotReady => Ok(Async::NotReady),
}
self.inner.poll()
}
}

View File

@@ -63,6 +63,7 @@ impl<I, In, Out> FramedIo for Framed<I, In, Out>
}
}
// `T` is the type that `Parser` parses.
struct Parser<T> {
state: ParserState,
_phantom_data: PhantomData<T>,