From a30e929b630d3eeb7ca6e2cc8921a5c08b31794e Mon Sep 17 00:00:00 2001 From: Tim Kuehn Date: Sat, 5 Nov 2016 15:43:31 -0700 Subject: [PATCH] Clarify some docs and fix some dumb code. --- src/client.rs | 7 ++----- src/framed.rs | 1 + 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/src/client.rs b/src/client.rs index a94e302..c17f0e9 100644 --- a/src/client.rs +++ b/src/client.rs @@ -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 { - match self.inner.poll()? { - Async::Ready(client) => Ok(Async::Ready(client)), - Async::NotReady => Ok(Async::NotReady), - } + self.inner.poll() } } diff --git a/src/framed.rs b/src/framed.rs index 9185239..f9a0542 100644 --- a/src/framed.rs +++ b/src/framed.rs @@ -63,6 +63,7 @@ impl FramedIo for Framed } } +// `T` is the type that `Parser` parses. struct Parser { state: ParserState, _phantom_data: PhantomData,