diff options
author | Alex Crichton <alex@alexcrichton.com> | 2017-02-05 17:06:57 -0800 |
---|---|---|
committer | Alex Crichton <alex@alexcrichton.com> | 2017-03-15 09:46:54 -0700 |
commit | 89fcc96dd44bff0ba85432d96a3a8f5b20adc94e (patch) | |
tree | fe257e453157874d6584b84b270ae462b9b88e20 /examples/echo.rs | |
parent | 8fecf98aef1bb2f4f37303c44b2a51126b9c54ff (diff) |
Migrate to using tokio-io
Deprecate the existing `io` module in this crate entirely.
More details coming soon!
Closes #61
Diffstat (limited to 'examples/echo.rs')
-rw-r--r-- | examples/echo.rs | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/examples/echo.rs b/examples/echo.rs index 45ced33e..80e73ea7 100644 --- a/examples/echo.rs +++ b/examples/echo.rs @@ -19,13 +19,15 @@ extern crate futures; extern crate tokio_core; +extern crate tokio_io; use std::env; use std::net::SocketAddr; use futures::Future; use futures::stream::Stream; -use tokio_core::io::{copy, Io}; +use tokio_io::AsyncRead; +use tokio_io::io::copy; use tokio_core::net::TcpListener; use tokio_core::reactor::Core; @@ -93,7 +95,7 @@ fn main() { // information. let msg = amt.then(move |result| { match result { - Ok(amt) => println!("wrote {} bytes to {}", amt, addr), + Ok((amt, _, _)) => println!("wrote {} bytes to {}", amt, addr), Err(e) => println!("error on {}: {}", addr, e), } |