diff --git a/src/server.rs b/src/server.rs index 1e1b4e6..53f01e6 100644 --- a/src/server.rs +++ b/src/server.rs @@ -138,22 +138,3 @@ fn listener(addr: &SocketAddr, handle: &Handle) -> io::Result { .listen(PENDING_CONNECTION_BACKLOG) .and_then(|l| TcpListener::from_listener(l, addr, handle)) } - -/// A future that resolves to a `ServerHandle`. -#[doc(hidden)] -pub struct ListenFuture { - inner: future::FutureResult, futures::Canceled>, -} - -impl Future for ListenFuture { - type Item = SocketAddr; - type Error = io::Error; - - fn poll(&mut self) -> futures::Poll { - // Can't panic the oneshot is always completed. - match self.inner.poll().unwrap() { - Async::Ready(result) => result.map(Async::Ready), - Async::NotReady => Ok(Async::NotReady), - } - } -}