fix(build): fix with_interceptor not building on Rust 1.51 (#669)
Fixes https://github.com/hyperium/tonic/issues/666
This commit is contained in:
@@ -50,7 +50,10 @@ pub fn generate<T: Service>(
|
|||||||
pub fn with_interceptor<F>(inner: T, interceptor: F) -> #service_ident<InterceptedService<T, F>>
|
pub fn with_interceptor<F>(inner: T, interceptor: F) -> #service_ident<InterceptedService<T, F>>
|
||||||
where
|
where
|
||||||
F: FnMut(tonic::Request<()>) -> Result<tonic::Request<()>, tonic::Status>,
|
F: FnMut(tonic::Request<()>) -> Result<tonic::Request<()>, tonic::Status>,
|
||||||
T: Service<http::Request<tonic::body::BoxBody>, Response = http::Response<T::ResponseBody>>,
|
T: Service<
|
||||||
|
http::Request<tonic::body::BoxBody>,
|
||||||
|
Response = http::Response<<T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody>
|
||||||
|
>,
|
||||||
<T as Service<http::Request<tonic::body::BoxBody>>>::Error: Into<StdError> + Send + Sync,
|
<T as Service<http::Request<tonic::body::BoxBody>>>::Error: Into<StdError> + Send + Sync,
|
||||||
{
|
{
|
||||||
#service_ident::new(InterceptedService::new(inner, interceptor))
|
#service_ident::new(InterceptedService::new(inner, interceptor))
|
||||||
|
|||||||
Reference in New Issue
Block a user