Shuffle around the sync/future modules

This commit is contained in:
Tim Kuehn
2016-12-26 16:02:44 -05:00
parent 18cbbe5b15
commit 5dbfa99d0b
5 changed files with 24 additions and 15 deletions

View File

@@ -396,7 +396,7 @@ macro_rules! service {
fn listen(self, addr: ::std::net::SocketAddr) -> $crate::ListenFuture
{
let (tx, rx) = $crate::futures::oneshot();
$crate::REMOTE.spawn(move |handle|
$crate::future::REMOTE.spawn(move |handle|
Ok(tx.complete(Self::listen_with(self,
addr,
handle.clone()))));
@@ -542,7 +542,7 @@ macro_rules! service {
{
let addr = $crate::util::FirstSocketAddr::try_first_socket_addr(&addr)?;
let (tx, rx) = $crate::futures::oneshot();
$crate::REMOTE.spawn(move |handle| Ok(tx.complete(Self::listen_with(self, addr, handle.clone()))));
$crate::future::REMOTE.spawn(move |handle| Ok(tx.complete(Self::listen_with(self, addr, handle.clone()))));
$crate::futures::Future::wait($crate::ListenFuture::from_oneshot(rx))
}