Skip to content

Commit 095233f

Browse files
committed
fix(build): fix with_interceptor not building on Rust 1.51
Fixes #666
1 parent 32173dc commit 095233f

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

tonic-build/src/client.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,10 @@ pub fn generate<T: Service>(
5050
pub fn with_interceptor<F>(inner: T, interceptor: F) -> #service_ident<InterceptedService<T, F>>
5151
where
5252
F: FnMut(tonic::Request<()>) -> Result<tonic::Request<()>, tonic::Status>,
53-
T: Service<http::Request<tonic::body::BoxBody>, Response = http::Response<T::ResponseBody>>,
53+
T: Service<
54+
http::Request<tonic::body::BoxBody>,
55+
Response = http::Response<<T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody>
56+
>,
5457
<T as Service<http::Request<tonic::body::BoxBody>>>::Error: Into<StdError> + Send + Sync,
5558
{
5659
#service_ident::new(InterceptedService::new(inner, interceptor))

0 commit comments

Comments
 (0)