Fix deprecation warnings in tests (#167)

This commit is contained in:
Carl Lerche 2018-03-01 21:50:07 -08:00 committed by GitHub
parent df19119c0a
commit df6e24255b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -16,7 +16,7 @@ use std::time::Duration;
use mio::event::Evented;
use mio::unix::{UnixReady, EventedFd};
use mio::{PollOpt, Ready, Token};
use tokio::reactor::{Handle, PollEvented};
use tokio::reactor::{Handle, PollEvented2};
use tokio_io::io::read_to_end;
use futures::Future;
@ -78,7 +78,7 @@ fn hup() {
thread::sleep(Duration::from_millis(100));
});
let source = PollEvented::new(MyFile::new(read), &handle).unwrap();
let source = PollEvented2::new_with_handle(MyFile::new(read), &handle).unwrap();
let reader = read_to_end(source, Vec::new());
let (_, content) = t!(reader.wait());