mirror of
https://github.com/actix/actix-extras.git
synced 2024-11-30 18:34:36 +01:00
fix RequestSession impl for HttpRequest
This commit is contained in:
parent
d80a0c9f94
commit
783e19c1bf
@ -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>>() {
|
||||
|
@ -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> {
|
||||
|
Loading…
Reference in New Issue
Block a user