1
0
mirror of https://github.com/fafhrd91/actix-web synced 2024-11-28 01:52:57 +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 signals = self.subscribe_to_signals();
let addr: SyncAddress<_> = Actor::start(self); let addr: SyncAddress<_> = Actor::start(self);
signals.map(|signals| signals.send( signals.map(|signals| signals.send(
signal::Subscribe(addr.clone().into_subscriber()))); signal::Subscribe(addr.clone().into())));
addr addr
} }
} }
@ -484,7 +484,7 @@ impl<T, A, H, U, V> HttpServer<WrapperStream<T>, A, H, U>
self self
}); });
signals.map(|signals| signals.send( signals.map(|signals| signals.send(
signal::Subscribe(addr.clone().into_subscriber()))); signal::Subscribe(addr.clone().into())));
addr addr
} }
} }
@ -668,7 +668,7 @@ fn start_accept_thread(sock: net::TcpListener, addr: net::SocketAddr, backlog: i
const CMD: mio::Token = mio::Token(1); const CMD: mio::Token = mio::Token(1);
let mut server = Some( let mut server = Some(
mio::net::TcpListener::from_listener(sock, &addr) mio::net::TcpListener::from_std(sock)
.expect("Can not create mio::net::TcpListener")); .expect("Can not create mio::net::TcpListener"));
// Create a poll instance // 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"); .expect("Can not create net::TcpListener");
server = Some( server = Some(
mio::net::TcpListener::from_listener(lst, &addr) mio::net::TcpListener::from_std(lst)
.expect("Can not create mio::net::TcpListener")); .expect("Can not create mio::net::TcpListener"));
if let Some(ref server) = server { if let Some(ref server) = server {