-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Description
Bug Report
When the RPC features client-streaming methods, generated code imposes a Debug
bound on the client object's parameter type.
Version
tonic v0.5.0
tonic-build v0.5.0
Description
In the generated code, the gRPC client method for a client-streaming request looks like this:
pub async fn push_headers(
&mut self,
request: impl tonic::IntoStreamingRequest<Message = super::Header>,
) -> Result<tonic::Response<super::PushHeadersResponse>, tonic::Status>
where
T: std::fmt::Debug,
{
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static("/iohk.chain.node.Node/PushHeaders");
self.inner
.client_streaming(request.into_streaming_request(), path, codec)
.await
}
It's not clear what in this code would make the Debug
bound necessary. Code generated for methods with other streaming signatures, including bidirectional methods, does not impose this bound.
Metadata
Metadata
Assignees
Labels
No labels