mirror of
https://github.com/actix/actix-extras.git
synced 2025-02-02 10:59:03 +01:00
update to alpha6
This commit is contained in:
parent
345e67cd13
commit
cb682b08e4
@ -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 }
|
||||
|
@ -90,18 +90,14 @@ impl RedisSession {
|
||||
}
|
||||
}
|
||||
|
||||
impl<S, P, B> Transform<S> for RedisSession
|
||||
impl<S, B> Transform<S> for RedisSession
|
||||
where
|
||||
S: Service<
|
||||
Request = ServiceRequest<P>,
|
||||
Response = ServiceResponse<B>,
|
||||
Error = Error,
|
||||
> + 'static,
|
||||
S: Service<Request = ServiceRequest, Response = ServiceResponse<B>, Error = Error>
|
||||
+ 'static,
|
||||
S::Future: 'static,
|
||||
P: 'static,
|
||||
B: 'static,
|
||||
{
|
||||
type Request = ServiceRequest<P>;
|
||||
type Request = ServiceRequest;
|
||||
type Response = ServiceResponse<B>;
|
||||
type Error = S::Error;
|
||||
type InitError = ();
|
||||
@ -122,18 +118,14 @@ pub struct RedisSessionMiddleware<S: 'static> {
|
||||
inner: Rc<Inner>,
|
||||
}
|
||||
|
||||
impl<S, P, B> Service for RedisSessionMiddleware<S>
|
||||
impl<S, B> Service for RedisSessionMiddleware<S>
|
||||
where
|
||||
S: Service<
|
||||
Request = ServiceRequest<P>,
|
||||
Response = ServiceResponse<B>,
|
||||
Error = Error,
|
||||
> + 'static,
|
||||
S: Service<Request = ServiceRequest, Response = ServiceResponse<B>, Error = Error>
|
||||
+ 'static,
|
||||
S::Future: 'static,
|
||||
P: 'static,
|
||||
B: 'static,
|
||||
{
|
||||
type Request = ServiceRequest<P>;
|
||||
type Request = ServiceRequest;
|
||||
type Response = ServiceResponse<B>;
|
||||
type Error = Error;
|
||||
type Future = Box<Future<Item = Self::Response, Error = Self::Error>>;
|
||||
@ -142,7 +134,7 @@ where
|
||||
self.service.poll_ready()
|
||||
}
|
||||
|
||||
fn call(&mut self, mut req: ServiceRequest<P>) -> 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<P>(
|
||||
fn load(
|
||||
&self,
|
||||
req: &ServiceRequest<P>,
|
||||
req: &ServiceRequest,
|
||||
) -> impl Future<Item = Option<(HashMap<String, String>, String)>, Error = Error>
|
||||
{
|
||||
if let Ok(cookies) = req.cookies() {
|
||||
|
Loading…
x
Reference in New Issue
Block a user