From bd3a07f9e7c46674578c438ce06a98b90f4ee136 Mon Sep 17 00:00:00 2001 From: Oliver Gould Date: Wed, 26 Jul 2017 14:15:47 -0700 Subject: [PATCH] Since ReadySink isn't public yet, expose Connection::is_ready(). (#7) Also use http from master --- Cargo.toml | 2 +- src/proto/connection.rs | 15 ++++----------- 2 files changed, 5 insertions(+), 12 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 827804c..7fc0c99 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -8,7 +8,7 @@ futures = "0.1" tokio-io = "0.1" tokio-timer = "0.1" bytes = "0.4" -http = { git = "https://github.com/carllerche/http", branch = "uri-parts" } +http = { git = "https://github.com/carllerche/http" } byteorder = "1.0" log = "0.3.8" fnv = "1.0.5" diff --git a/src/proto/connection.rs b/src/proto/connection.rs index b0afc8b..037e6cd 100644 --- a/src/proto/connection.rs +++ b/src/proto/connection.rs @@ -71,6 +71,10 @@ impl Connection self.inner.take_pong() } + pub fn poll_ready(&mut self) -> Poll<(), ConnectionError> { + self.inner.poll_ready() + } + pub fn send_data(self, id: StreamId, data: B, @@ -246,14 +250,3 @@ impl Sink for Connection self.inner.poll_complete() } } - -impl ReadySink for Connection - where T: AsyncRead + AsyncWrite, - P: Peer, - B: IntoBuf, -{ - fn poll_ready(&mut self) -> Poll<(), Self::SinkError> { - trace!("poll_ready"); - self.inner.poll_ready() - } -}