From afbd3b5453ee7ed3dda805a3b12c5a493840a254 Mon Sep 17 00:00:00 2001 From: Johannes Hermann Date: Sun, 11 Apr 2021 19:29:40 +0200 Subject: [PATCH] removed second lifetime of FromRequest according to recent change in rocket --- src/headers.rs | 12 ++++++------ src/lib.rs | 4 ++-- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/headers.rs b/src/headers.rs index c9a93bf..1d995e8 100644 --- a/src/headers.rs +++ b/src/headers.rs @@ -134,11 +134,11 @@ impl fmt::Display for Origin { } #[rocket::async_trait] -impl<'a, 'r> FromRequest<'a, 'r> for Origin { +impl<'r> FromRequest<'r> for Origin { type Error = crate::Error; async fn from_request( - request: &'a rocket::Request<'r>, + request: &'r rocket::Request<'_>, ) -> request::Outcome { Origin::from_request_sync(request) } @@ -180,11 +180,11 @@ impl FromStr for AccessControlRequestMethod { } #[rocket::async_trait] -impl<'a, 'r> FromRequest<'a, 'r> for AccessControlRequestMethod { +impl<'r> FromRequest<'r> for AccessControlRequestMethod { type Error = crate::Error; async fn from_request( - request: &'a rocket::Request<'r>, + request: &'r rocket::Request<'_>, ) -> request::Outcome { AccessControlRequestMethod::from_request_sync(request) } @@ -238,11 +238,11 @@ impl FromStr for AccessControlRequestHeaders { } #[rocket::async_trait] -impl<'a, 'r> FromRequest<'a, 'r> for AccessControlRequestHeaders { +impl<'r> FromRequest<'r> for AccessControlRequestHeaders { type Error = crate::Error; async fn from_request( - request: &'a rocket::Request<'r>, + request: &'r rocket::Request<'_>, ) -> request::Outcome { AccessControlRequestHeaders::from_request_sync(request) } diff --git a/src/lib.rs b/src/lib.rs index 0cb89ff..250330e 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1516,10 +1516,10 @@ impl<'r, 'o: 'r> Guard<'r> { } #[rocket::async_trait] -impl<'a, 'r> FromRequest<'a, 'r> for Guard<'r> { +impl<'r> FromRequest<'r> for Guard<'r> { type Error = Error; - async fn from_request(request: &'a Request<'r>) -> rocket::request::Outcome { + async fn from_request(request: &'r Request<'_>) -> rocket::request::Outcome { let options = match request.guard::>().await { Outcome::Success(options) => options, _ => {