chore: removed commented code for Service impl

This commit is contained in:
Daniel Gallups 2023-12-01 15:16:50 -05:00
parent 7970a6c358
commit dd2a48b00c

View file

@ -187,36 +187,6 @@ where
} }
} }
} }
/*
impl<ReqBody, S, C> Service<Request<ReqBody>> for AuthorizationService<S, C>
where
ReqBody: Send + Sync + 'static,
S: Service<Request<ReqBody>> + Clone,
S::Response: From<AuthError>,
C: Clone + DeserializeOwned + Send + Sync + 'static,
{
type Response = S::Response;
type Error = S::Error;
type Future = ResponseFuture<S, ReqBody, C>;
fn poll_ready(&mut self, cx: &mut Context<'_>) -> Poll<Result<(), Self::Error>> {
self.inner.poll_ready(cx)
}
fn call(&mut self, req: Request<ReqBody>) -> Self::Future {
let inner = self.inner.clone();
// take the service that was ready
let inner = std::mem::replace(&mut self.inner, inner);
let auth_fut = self.authorize(req);
ResponseFuture {
state: State::Authorize { auth_fut },
service: inner,
}
}
}
*/
#[pin_project] #[pin_project]
/// Response future for [`AuthorizationService`]. /// Response future for [`AuthorizationService`].