1
0
mirror of https://github.com/fafhrd91/actix-net synced 2025-06-29 04:54:59 +02:00

fix examples

This commit is contained in:
Nikolay Kim
2018-08-23 13:39:13 -07:00
parent d97f78afbe
commit 1261ecbce0
3 changed files with 37 additions and 30 deletions

View File

@ -170,7 +170,7 @@ impl<C: Config> Server<C> {
/// Add new service to server
pub fn bind<F, U, N>(mut self, addr: U, factory: F) -> io::Result<Self>
where
F: Fn() -> N + Copy + Send + 'static,
F: Fn() -> N + Clone + Send + 'static,
U: net::ToSocketAddrs,
N: NewService<Request = TcpStream, Response = (), Config = C, InitError = io::Error> + 'static,
N::Service: 'static,
@ -188,7 +188,7 @@ impl<C: Config> Server<C> {
/// Add new service to server
pub fn listen<F, N>(mut self, lst: net::TcpListener, factory: F) -> Self
where
F: Fn() -> N + Copy + Send + 'static,
F: Fn() -> N + Clone + Send + 'static,
N: NewService<Request = TcpStream, Response = (), Config = C, InitError = io::Error> + 'static,
N::Service: 'static,
N::Future: 'static,