Remove dead code

This commit is contained in:
Tim Kuehn
2017-02-16 01:00:40 -08:00
parent 1325d1a2d7
commit 517477129c

View File

@@ -138,22 +138,3 @@ fn listener(addr: &SocketAddr, handle: &Handle) -> io::Result<TcpListener> {
.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<io::Result<SocketAddr>, futures::Canceled>,
}
impl Future for ListenFuture {
type Item = SocketAddr;
type Error = io::Error;
fn poll(&mut self) -> futures::Poll<Self::Item, Self::Error> {
// 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),
}
}
}