fix(client): Use Stream instead of TrySteam for client calls (#61)
This commit is contained in:
committed by
Lucio Franco
parent
8cddf8a12c
commit
7eda823c9c
@@ -133,7 +133,7 @@ fn generate_client_streaming(method: &Method, proto: &str, path: String) -> Toke
|
||||
quote! {
|
||||
pub async fn #ident<S>(&mut self, request: tonic::Request<S>)
|
||||
-> Result<tonic::Response<#response>, tonic::Status>
|
||||
where S: Stream<Item = Result<#request, tonic::Status>> + Send + 'static,
|
||||
where S: Stream<Item = #request> + Send + 'static,
|
||||
{
|
||||
self.ready().await?;
|
||||
let codec = tonic::codec::ProstCodec::new();
|
||||
@@ -151,7 +151,7 @@ fn generate_streaming(method: &Method, proto: &str, path: String) -> TokenStream
|
||||
quote! {
|
||||
pub async fn #ident<S>(&mut self, request: tonic::Request<S>)
|
||||
-> Result<tonic::Response<tonic::codec::Streaming<#response>>, tonic::Status>
|
||||
where S: Stream<Item = Result<#request, tonic::Status>> + Send + 'static,
|
||||
where S: Stream<Item = #request> + Send + 'static,
|
||||
{
|
||||
self.ready().await?;
|
||||
let codec = tonic::codec::ProstCodec::new();
|
||||
|
||||
Reference in New Issue
Block a user