diff --git a/viz-router/src/resources.rs b/viz-router/src/resources.rs index c8a80912..7fac8634 100644 --- a/viz-router/src/resources.rs +++ b/viz-router/src/resources.rs @@ -72,7 +72,7 @@ impl Resources { pub(crate) fn on(mut self, kind: Kind, method: Method, handler: H) -> Self where H: Handler> + Clone, - O: IntoResponse + Send + 'static, + O: IntoResponse, { match self .routes @@ -95,7 +95,7 @@ impl Resources { pub fn index(self, handler: H) -> Self where H: Handler> + Clone, - O: IntoResponse + Send + 'static, + O: IntoResponse, { self.on(Kind::Empty, Method::GET, handler) } @@ -105,7 +105,7 @@ impl Resources { pub fn new(self, handler: H) -> Self where H: Handler> + Clone, - O: IntoResponse + Send + 'static, + O: IntoResponse, { self.on(Kind::New, Method::GET, handler) } @@ -115,7 +115,7 @@ impl Resources { pub fn create(self, handler: H) -> Self where H: Handler> + Clone, - O: IntoResponse + Send + 'static, + O: IntoResponse, { self.on(Kind::Empty, Method::POST, handler) } @@ -125,7 +125,7 @@ impl Resources { pub fn show(self, handler: H) -> Self where H: Handler> + Clone, - O: IntoResponse + Send + 'static, + O: IntoResponse, { self.on(Kind::Id, Method::GET, handler) } @@ -135,7 +135,7 @@ impl Resources { pub fn edit(self, handler: H) -> Self where H: Handler> + Clone, - O: IntoResponse + Send + 'static, + O: IntoResponse, { self.on(Kind::Edit, Method::GET, handler) } @@ -145,7 +145,7 @@ impl Resources { pub fn update(self, handler: H) -> Self where H: Handler> + Clone, - O: IntoResponse + Send + 'static, + O: IntoResponse, { self.on(Kind::Id, Method::PUT, handler) } @@ -155,7 +155,7 @@ impl Resources { pub fn update_with_patch(self, handler: H) -> Self where H: Handler> + Clone, - O: IntoResponse + Send + 'static, + O: IntoResponse, { self.on(Kind::Id, Method::PATCH, handler) } @@ -165,7 +165,7 @@ impl Resources { pub fn destroy(self, handler: H) -> Self where H: Handler> + Clone, - O: IntoResponse + Send + 'static, + O: IntoResponse, { self.on(Kind::Id, Method::DELETE, handler) } @@ -288,7 +288,7 @@ mod tests { #[async_trait] impl Handler for LoggerHandler where - H: Handler + Send + Clone + 'static, + H: Handler, { type Output = H::Output; @@ -307,8 +307,8 @@ mod tests { async fn around((req, handler): Next) -> Result where - H: Handler> + Clone, - O: IntoResponse + Send + 'static, + H: Handler>, + O: IntoResponse, { handler.call(req).await.map(IntoResponse::into_response) }