removed second lifetime of FromRequest according to recent change in rocket

This commit is contained in:
Johannes Hermann 2021-04-11 19:29:40 +02:00
parent 305971023d
commit afbd3b5453
2 changed files with 8 additions and 8 deletions

View File

@ -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<Self, crate::Error> {
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<Self, crate::Error> {
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<Self, crate::Error> {
AccessControlRequestHeaders::from_request_sync(request)
}

View File

@ -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<Self, Self::Error> {
async fn from_request(request: &'r Request<'_>) -> rocket::request::Outcome<Self, Self::Error> {
let options = match request.guard::<State<'_, Cors>>().await {
Outcome::Success(options) => options,
_ => {