summaryrefslogtreecommitdiffstats
path: root/examples/tinyhttp.rs
diff options
context:
space:
mode:
authorCarl Lerche <me@carllerche.com>2018-02-01 10:31:07 -0800
committerGitHub <noreply@github.com>2018-02-01 10:31:07 -0800
commit2e94b658ed161ef7207a8decb20564556e9883f8 (patch)
treeb5ae64e1760a4b648398290f7958cd202a470c8b /examples/tinyhttp.rs
parentb9db119b456427d655b651f4f16d4266e6e16d98 (diff)
Track futures tokio-reform branch (#88)
This patch also updates tests and examples to remove deprecated API usage.
Diffstat (limited to 'examples/tinyhttp.rs')
-rw-r--r--examples/tinyhttp.rs5
1 files changed, 2 insertions, 3 deletions
diff --git a/examples/tinyhttp.rs b/examples/tinyhttp.rs
index 00c16fec..b0106d63 100644
--- a/examples/tinyhttp.rs
+++ b/examples/tinyhttp.rs
@@ -31,8 +31,7 @@ use std::net::{self, SocketAddr};
use std::thread;
use bytes::BytesMut;
-use futures::future::Executor;
-use futures::future;
+use futures::future::{self, Executor};
use futures::sync::mpsc;
use futures::{Stream, Future, Sink};
use futures_cpupool::CpuPool;
@@ -91,7 +90,7 @@ fn worker(rx: mpsc::UnboundedReceiver<net::TcpStream>) {
})).unwrap();
Ok(())
});
- done.wait().unwrap();
+ future::blocking(done).wait().unwrap();
}
/// "Server logic" is implemented in this function.