mirror of
https://github.com/tokio-rs/tokio.git
synced 2026-08-29 00:00:11 +02:00
Migrate to using tokio-io
Deprecate the existing `io` module in this crate entirely. More details coming soon! Closes #61
This commit is contained in:
+4
-3
@@ -1,6 +1,7 @@
|
||||
extern crate env_logger;
|
||||
extern crate futures;
|
||||
extern crate tokio_core;
|
||||
extern crate env_logger;
|
||||
extern crate tokio_io;
|
||||
|
||||
use std::net::TcpStream;
|
||||
use std::thread;
|
||||
@@ -8,7 +9,7 @@ use std::io::{Read, Write, BufReader, BufWriter};
|
||||
|
||||
use futures::Future;
|
||||
use futures::stream::Stream;
|
||||
use tokio_core::io::copy;
|
||||
use tokio_io::io::copy;
|
||||
use tokio_core::net::TcpListener;
|
||||
use tokio_core::reactor::Core;
|
||||
|
||||
@@ -55,7 +56,7 @@ fn echo_server() {
|
||||
copy(a, b)
|
||||
});
|
||||
|
||||
let amt = t!(l.run(copied));
|
||||
let (amt, _, _) = t!(l.run(copied));
|
||||
let (expected, t2) = t.join().unwrap();
|
||||
let actual = t2.join().unwrap();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user