1
0
mirror of https://github.com/actix/actix-extras.git synced 2024-11-28 01:32:57 +01:00

fix RequestSession impl for HttpRequest

This commit is contained in:
Nikolay Kim 2017-12-28 11:43:45 -08:00
parent d80a0c9f94
commit 783e19c1bf
2 changed files with 3 additions and 2 deletions

View File

@ -41,7 +41,7 @@ pub trait RequestSession {
fn session(&mut self) -> Session;
}
impl RequestSession for HttpRequest {
impl<S> RequestSession for HttpRequest<S> {
fn session(&mut self) -> Session {
if let Some(s_impl) = self.extensions().get_mut::<Arc<SessionImplBox>>() {

View File

@ -350,7 +350,8 @@ impl<H: HttpHandler, U, V> HttpServer<TcpStream, net::SocketAddr, H, U>
/// .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<Self> {