diff --git a/odilia/src/tower/handler.rs b/odilia/src/tower/handler.rs index 04f44a8..f4611a8 100644 --- a/odilia/src/tower/handler.rs +++ b/odilia/src/tower/handler.rs @@ -12,7 +12,7 @@ use tower::Service; pub trait Handler { type Response; type Future: Future; - fn into_service(self) -> HandlerService + fn into_service(self) -> HandlerService where Self: Sized, { @@ -47,11 +47,11 @@ impl_handler!(T1, T2, T3, T4, T5, T6,); impl_handler!(T1, T2, T3, T4, T5, T6, T7,); #[allow(clippy::type_complexity)] -pub struct HandlerService { +pub struct HandlerService { handler: H, - _marker: PhantomData R>, + _marker: PhantomData, } -impl Clone for HandlerService +impl Clone for HandlerService where H: Clone, { @@ -59,7 +59,7 @@ where HandlerService { handler: self.handler.clone(), _marker: PhantomData } } } -impl HandlerService { +impl HandlerService { fn new(handler: H) -> Self where H: Handler, @@ -68,7 +68,7 @@ impl HandlerService { } } -impl Service for HandlerService +impl Service for HandlerService where H: Handler + Clone, { diff --git a/odilia/src/tower/handlers.rs b/odilia/src/tower/handlers.rs index 1333309..a9b4b12 100644 --- a/odilia/src/tower/handlers.rs +++ b/odilia/src/tower/handlers.rs @@ -116,7 +116,7 @@ impl Handlers { , C>>::Error: Send, { let try_cmd_service = handler - .into_service::() + .into_service() .unwrap_map(|r| r.into()) .request_async_try_from() .with_state(Arc::clone(&self.state)) @@ -146,7 +146,7 @@ impl Handlers { , E>>::Future: Send, { let serv = handler - .into_service::() + .into_service() .unwrap_map(|res| res.try_into_commands()) .request_async_try_from() .with_state(Arc::clone(&self.state))