From cb682b08e47b1caab06c7ca45dccef6505d45a9d Mon Sep 17 00:00:00 2001 From: Nikolay Kim Date: Sun, 14 Apr 2019 10:30:37 -0700 Subject: [PATCH] update to alpha6 --- Cargo.toml | 6 +++--- src/session.rs | 30 +++++++++++------------------- 2 files changed, 14 insertions(+), 22 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index df9dc456c..36df610b9 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -28,7 +28,7 @@ default = ["web"] web = ["actix/http", "actix-service", "actix-utils", "actix-web", "actix-session/cookie-session", "rand", "serde", "serde_json"] [dependencies] -actix = "0.8.0-alpha.2" +actix = "0.8.0-alpha.3" log = "0.4" backoff = "0.1" @@ -41,10 +41,10 @@ redis-async = "0.4" time = "0.1" # actix web session -actix-web = { version = "1.0.0-alpha.2", optional=true } +actix-web = { version = "1.0.0-alpha.6", optional=true } actix-utils = { version = "0.3.3", optional=true } actix-service = { version = "0.3.4", optional=true } -actix-session = { version = "0.1.0-alpha.2", optional=true } +actix-session = { version = "0.1.0-alpha.6", optional=true } rand = { version="0.6.5", optional=true } serde = { version="1.0", optional=true } serde_json = { version="1.0", optional=true } diff --git a/src/session.rs b/src/session.rs index b36ea0ff0..935a7ce22 100644 --- a/src/session.rs +++ b/src/session.rs @@ -90,18 +90,14 @@ impl RedisSession { } } -impl Transform for RedisSession +impl Transform for RedisSession where - S: Service< - Request = ServiceRequest

, - Response = ServiceResponse, - Error = Error, - > + 'static, + S: Service, Error = Error> + + 'static, S::Future: 'static, - P: 'static, B: 'static, { - type Request = ServiceRequest

; + type Request = ServiceRequest; type Response = ServiceResponse; type Error = S::Error; type InitError = (); @@ -122,18 +118,14 @@ pub struct RedisSessionMiddleware { inner: Rc, } -impl Service for RedisSessionMiddleware +impl Service for RedisSessionMiddleware where - S: Service< - Request = ServiceRequest

, - Response = ServiceResponse, - Error = Error, - > + 'static, + S: Service, Error = Error> + + 'static, S::Future: 'static, - P: 'static, B: 'static, { - type Request = ServiceRequest

; + type Request = ServiceRequest; type Response = ServiceResponse; type Error = Error; type Future = Box>; @@ -142,7 +134,7 @@ where self.service.poll_ready() } - fn call(&mut self, mut req: ServiceRequest

) -> Self::Future { + fn call(&mut self, mut req: ServiceRequest) -> Self::Future { let mut srv = self.service.clone(); let inner = self.inner.clone(); @@ -178,9 +170,9 @@ struct Inner { } impl Inner { - fn load

( + fn load( &self, - req: &ServiceRequest

, + req: &ServiceRequest, ) -> impl Future, String)>, Error = Error> { if let Ok(cookies) = req.cookies() {