From 60d776b019854b6a6881d69823a36dcc18b1b4ce Mon Sep 17 00:00:00 2001 From: Lucio Franco Date: Wed, 2 Aug 2023 15:04:45 -0400 Subject: [PATCH] fix(codegen): Use stream type from codegen mod (#1446) * fix(codegen): Use stream type from codegen mod * Add generated code --- tonic-build/src/server.rs | 4 ++-- tonic-health/src/generated/grpc.health.v1.rs | 2 +- tonic-reflection/src/generated/grpc.reflection.v1alpha.rs | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/tonic-build/src/server.rs b/tonic-build/src/server.rs index e4de8d80c..06968f4c0 100644 --- a/tonic-build/src/server.rs +++ b/tonic-build/src/server.rs @@ -313,7 +313,7 @@ fn generate_trait_methods( quote! { #stream_doc - type #stream: tokio_stream::Stream> + Send + 'static; + type #stream: tonic::codegen::tokio_stream::Stream> + Send + 'static; #method_doc async fn #name(#self_param, request: tonic::Request<#req_message>) @@ -329,7 +329,7 @@ fn generate_trait_methods( quote! { #stream_doc - type #stream: tokio_stream::Stream> + Send + 'static; + type #stream: tonic::codegen::tokio_stream::Stream> + Send + 'static; #method_doc async fn #name(#self_param, request: tonic::Request>) diff --git a/tonic-health/src/generated/grpc.health.v1.rs b/tonic-health/src/generated/grpc.health.v1.rs index 9ccba4b0b..9662361f0 100644 --- a/tonic-health/src/generated/grpc.health.v1.rs +++ b/tonic-health/src/generated/grpc.health.v1.rs @@ -216,7 +216,7 @@ pub mod health_server { tonic::Status, >; /// Server streaming response type for the Watch method. - type WatchStream: tokio_stream::Stream< + type WatchStream: tonic::codegen::tokio_stream::Stream< Item = std::result::Result, > + Send diff --git a/tonic-reflection/src/generated/grpc.reflection.v1alpha.rs b/tonic-reflection/src/generated/grpc.reflection.v1alpha.rs index 0c68b8182..5b899af31 100644 --- a/tonic-reflection/src/generated/grpc.reflection.v1alpha.rs +++ b/tonic-reflection/src/generated/grpc.reflection.v1alpha.rs @@ -271,7 +271,7 @@ pub mod server_reflection_server { #[async_trait] pub trait ServerReflection: Send + Sync + 'static { /// Server streaming response type for the ServerReflectionInfo method. - type ServerReflectionInfoStream: tokio_stream::Stream< + type ServerReflectionInfoStream: tonic::codegen::tokio_stream::Stream< Item = std::result::Result< super::ServerReflectionResponse, tonic::Status,