From 783e19c1bf7676eee819cac2ec8df51f03cc719c Mon Sep 17 00:00:00 2001 From: Nikolay Kim Date: Thu, 28 Dec 2017 11:43:45 -0800 Subject: [PATCH] fix RequestSession impl for HttpRequest --- src/middleware/session.rs | 2 +- src/server.rs | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/middleware/session.rs b/src/middleware/session.rs index a03077c26..fbde31258 100644 --- a/src/middleware/session.rs +++ b/src/middleware/session.rs @@ -41,7 +41,7 @@ pub trait RequestSession { fn session(&mut self) -> Session; } -impl RequestSession for HttpRequest { +impl RequestSession for HttpRequest { fn session(&mut self) -> Session { if let Some(s_impl) = self.extensions().get_mut::>() { diff --git a/src/server.rs b/src/server.rs index 425f7eca9..cda09352f 100644 --- a/src/server.rs +++ b/src/server.rs @@ -350,7 +350,8 @@ impl HttpServer /// .bind("127.0.0.1:0").expect("Can not bind to 127.0.0.1:0") /// .spawn(); /// - /// let _ = addr.call_fut(dev::StopServer).wait(); // <- Send `StopServer` message to server. + /// let _ = addr.call_fut( + /// dev::StopServer{graceful:true}).wait(); // <- Send `StopServer` message to server. /// } /// ``` pub fn spawn(mut self) -> SyncAddress {