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:
parent
681ef5d894
commit
f2bcc8438f
4 changed files with 27 additions and 11 deletions
|
@ -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)
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue