From 67bf0ae79f676c98e30106f6c2d2303ad9c8ac5f Mon Sep 17 00:00:00 2001 From: Nikolay Kim Date: Wed, 7 Mar 2018 14:46:12 -0800 Subject: [PATCH] fix HttpServer::listen method --- src/server/srv.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/server/srv.rs b/src/server/srv.rs index 627f7a32f..e802e4ef0 100644 --- a/src/server/srv.rs +++ b/src/server/srv.rs @@ -177,8 +177,9 @@ impl HttpServer where H: IntoHttpHandler + 'static /// /// HttpServer does not change any configuration for TcpListener, /// it needs to be configured before passing it to listen() method. - pub fn listen(mut self, lst: net::TcpListener) { + pub fn listen(mut self, lst: net::TcpListener) -> Self { self.sockets.insert(lst.local_addr().unwrap(), lst); + self } /// The socket address to bind