Skip to content

Commit

Permalink
fix(build): fix with_interceptor not building on Rust 1.51 (#669)
Browse files Browse the repository at this point in the history
Fixes #666
  • Loading branch information
davidpdrsn committed May 27, 2021
1 parent 32173dc commit 9478fac
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion tonic-build/src/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,10 @@ pub fn generate<T: Service>(
pub fn with_interceptor<F>(inner: T, interceptor: F) -> #service_ident<InterceptedService<T, F>>
where
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,
{
#service_ident::new(InterceptedService::new(inner, interceptor))
Expand Down

0 comments on commit 9478fac

Please sign in to comment.