1
0
mirror of https://github.com/actix/actix-extras.git synced 2024-12-01 02:44:37 +01:00

fix deprecation warnings, update actix

This commit is contained in:
Nikolay Kim 2018-02-08 17:00:22 -08:00
parent 6181a84d7b
commit 2faf3a5eb6

View File

@ -314,7 +314,7 @@ impl<H: HttpHandler, U, V> HttpServer<TcpStream, net::SocketAddr, H, U>
let signals = self.subscribe_to_signals();
let addr: SyncAddress<_> = Actor::start(self);
signals.map(|signals| signals.send(
signal::Subscribe(addr.clone().into_subscriber())));
signal::Subscribe(addr.clone().into())));
addr
}
}
@ -484,7 +484,7 @@ impl<T, A, H, U, V> HttpServer<WrapperStream<T>, A, H, U>
self
});
signals.map(|signals| signals.send(
signal::Subscribe(addr.clone().into_subscriber())));
signal::Subscribe(addr.clone().into())));
addr
}
}
@ -668,7 +668,7 @@ fn start_accept_thread(sock: net::TcpListener, addr: net::SocketAddr, backlog: i
const CMD: mio::Token = mio::Token(1);
let mut server = Some(
mio::net::TcpListener::from_listener(sock, &addr)
mio::net::TcpListener::from_std(sock)
.expect("Can not create mio::net::TcpListener"));
// Create a poll instance
@ -737,7 +737,7 @@ fn start_accept_thread(sock: net::TcpListener, addr: net::SocketAddr, backlog: i
.expect("Can not create net::TcpListener");
server = Some(
mio::net::TcpListener::from_listener(lst, &addr)
mio::net::TcpListener::from_std(lst)
.expect("Can not create mio::net::TcpListener"));
if let Some(ref server) = server {