diff options
author | Carl Lerche <me@carllerche.com> | 2018-02-01 10:31:07 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-02-01 10:31:07 -0800 |
commit | 2e94b658ed161ef7207a8decb20564556e9883f8 (patch) | |
tree | b5ae64e1760a4b648398290f7958cd202a470c8b /examples/echo-udp.rs | |
parent | b9db119b456427d655b651f4f16d4266e6e16d98 (diff) |
Track futures tokio-reform branch (#88)
This patch also updates tests and examples to remove deprecated API
usage.
Diffstat (limited to 'examples/echo-udp.rs')
-rw-r--r-- | examples/echo-udp.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/examples/echo-udp.rs b/examples/echo-udp.rs index f7e2bf09..2ce43bc0 100644 --- a/examples/echo-udp.rs +++ b/examples/echo-udp.rs @@ -18,7 +18,7 @@ extern crate tokio_io; use std::{env, io}; use std::net::SocketAddr; -use futures::{Future, Poll}; +use futures::{future, Future, Poll}; use tokio::net::UdpSocket; struct Server { @@ -58,9 +58,9 @@ fn main() { // Next we'll create a future to spawn (the one we defined above) and then // we'll block our current thread waiting on the result of the future - Server { + future::blocking(Server { socket: socket, buf: vec![0; 1024], to_send: None, - }.wait().unwrap(); + }).wait().unwrap(); } |