mirror of
https://github.com/OMGeeky/tarpc.git
synced 2025-12-28 15:22:30 +01:00
Remove dead code
This commit is contained in:
@@ -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),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user