Remove &addr arg from TcpListener::from_std (#92)

This has been deprecated in mio.
This commit is contained in:
Carl Lerche
2018-01-30 14:49:32 -06:00
committed by Alex Crichton
parent fd37fb0f17
commit 117dcba8cb
3 changed files with 6 additions and 6 deletions
+2 -4
View File
@@ -15,8 +15,7 @@ fn tcp_doesnt_block() {
let core = Reactor::new().unwrap();
let handle = core.handle();
let listener = net::TcpListener::bind("127.0.0.1:0").unwrap();
let addr = listener.local_addr().unwrap();
let listener = TcpListener::from_std(listener, &addr, &handle).unwrap();
let listener = TcpListener::from_std(listener, &handle).unwrap();
drop(core);
assert!(listener.incoming().wait().next().unwrap().is_err());
}
@@ -26,8 +25,7 @@ fn drop_wakes() {
let core = Reactor::new().unwrap();
let handle = core.handle();
let listener = net::TcpListener::bind("127.0.0.1:0").unwrap();
let addr = listener.local_addr().unwrap();
let listener = TcpListener::from_std(listener, &addr, &handle).unwrap();
let listener = TcpListener::from_std(listener, &handle).unwrap();
let (tx, rx) = oneshot::channel::<()>();
let t = thread::spawn(move || {
let incoming = listener.incoming();