1
0
Fork 0
mirror of https://gitlab.com/msrd0/gotham-restful.git synced 2025-05-09 08:00:41 +00:00

fix implicit &'static mut State error

This commit is contained in:
Dominic 2021-01-18 19:04:06 +01:00
parent 681ef5d894
commit f2bcc8438f
Signed by: msrd0
GPG key ID: DCC8C247452E98F9
4 changed files with 27 additions and 11 deletions

View file

@ -56,12 +56,12 @@ pub trait Endpoint {
}
/// The handler for this endpoint.
fn handle(
state: &mut State,
fn handle<'a>(
state: &'a mut State,
placeholders: Self::Placeholders,
params: Self::Params,
body: Option<Self::Body>
) -> BoxFuture<'static, Self::Output>;
) -> BoxFuture<'a, Self::Output>;
}
#[cfg(feature = "openapi")]
@ -94,12 +94,12 @@ impl<E: EndpointWithSchema> Endpoint for E {
E::wants_auth()
}
fn handle(
state: &mut State,
fn handle<'a>(
state: &'a mut State,
placeholders: Self::Placeholders,
params: Self::Params,
body: Option<Self::Body>
) -> BoxFuture<'static, Self::Output> {
) -> BoxFuture<'a, Self::Output> {
E::handle(state, placeholders, params, body)
}
}