diff --git a/web/src/app/mod.rs b/web/src/app/mod.rs index 815271b0..69a94085 100644 --- a/web/src/app/mod.rs +++ b/web/src/app/mod.rs @@ -190,7 +190,7 @@ mod test { assert_eq!(path, req.req().uri().path()); state.to_string() } - + #[derive(Clone)] struct Middleware; diff --git a/web/src/handler/types/body.rs b/web/src/handler/types/body.rs index f294aa87..8f90bb81 100644 --- a/web/src/handler/types/body.rs +++ b/web/src/handler/types/body.rs @@ -4,7 +4,7 @@ use crate::{handler::FromRequest, request::RequestBody, request::WebRequest}; pub struct Body(pub RequestBody); -impl<'a, 'r, 's, S> FromRequest<'a, &'r mut WebRequest<'s, S>> for Body { +impl<'a, 'r, 's, S: 's> FromRequest<'a, &'r mut WebRequest<'s, S>> for Body { type Type<'b> = Body; type Error = Infallible; type Future = impl Future> where &'r mut WebRequest<'s, S>: 'a; diff --git a/web/src/handler/types/extension.rs b/web/src/handler/types/extension.rs index 2f177eea..790a00ed 100644 --- a/web/src/handler/types/extension.rs +++ b/web/src/handler/types/extension.rs @@ -19,7 +19,7 @@ impl Deref for ExtensionRef<'_, T> { } } -impl<'a, 'r, 's, S, T> FromRequest<'a, &'r mut WebRequest<'s, S>> for ExtensionRef<'a, T> +impl<'a, 'r, 's, S: 's, T> FromRequest<'a, &'r mut WebRequest<'s, S>> for ExtensionRef<'a, T> where T: Send + Sync + 'static, { @@ -44,7 +44,7 @@ impl Deref for ExtensionsRef<'_> { } } -impl<'a, 'r, 's, S> FromRequest<'a, &'r mut WebRequest<'s, S>> for ExtensionsRef<'a> { +impl<'a, 'r, 's, S: 's> FromRequest<'a, &'r mut WebRequest<'s, S>> for ExtensionsRef<'a> { type Type<'b> = ExtensionsRef<'b>; type Error = Infallible; type Future = impl Future> where &'r mut WebRequest<'s, S>: 'a; diff --git a/web/src/handler/types/json.rs b/web/src/handler/types/json.rs index 87fcb7fc..b0ad1ac9 100644 --- a/web/src/handler/types/json.rs +++ b/web/src/handler/types/json.rs @@ -55,7 +55,7 @@ impl DerefMut for Json { } } -impl<'a, 'r, 's, S, T, const LIMIT: usize> FromRequest<'a, &'r mut WebRequest<'s, S>> for Json +impl<'a, 'r, 's, S:'s, T, const LIMIT: usize> FromRequest<'a, &'r mut WebRequest<'s, S>> for Json where T: DeserializeOwned, { diff --git a/web/src/handler/types/path.rs b/web/src/handler/types/path.rs index fce0cd18..c176a307 100644 --- a/web/src/handler/types/path.rs +++ b/web/src/handler/types/path.rs @@ -13,7 +13,7 @@ impl Deref for PathRef<'_> { } } -impl<'a, 'r, 's, S> FromRequest<'a, &'r mut WebRequest<'s, S>> for PathRef<'a> { +impl<'a, 'r, 's, S: 's> FromRequest<'a, &'r mut WebRequest<'s, S>> for PathRef<'a> { type Type<'b> = PathRef<'b>; type Error = Infallible; type Future = impl Future> where &'r mut WebRequest<'s, S>: 'a; diff --git a/web/src/handler/types/request.rs b/web/src/handler/types/request.rs index c0a29f1a..b4ae1f3c 100644 --- a/web/src/handler/types/request.rs +++ b/web/src/handler/types/request.rs @@ -13,7 +13,7 @@ impl Deref for RequestRef<'_> { } } -impl<'a, 'r, 's, S> FromRequest<'a, &'r mut WebRequest<'s, S>> for RequestRef<'a> { +impl<'a, 'r, 's, S: 's> FromRequest<'a, &'r mut WebRequest<'s, S>> for RequestRef<'a> { type Type<'b> = RequestRef<'b>; type Error = Infallible; type Future = impl Future> where &'r mut WebRequest<'s, S>: 'a;