fix(build): Allow Services to be named Result (#1203)

closes #1156
This commit is contained in:
Shrutesh Pachineela
2022-12-21 12:07:07 -05:00
committed by GitHub
parent a72cf04b44
commit a562a3ce32
10 changed files with 86 additions and 21 deletions
@@ -218,7 +218,7 @@ pub mod server_reflection_client {
request: impl tonic::IntoStreamingRequest<
Message = super::ServerReflectionRequest,
>,
) -> Result<
) -> std::result::Result<
tonic::Response<tonic::codec::Streaming<super::ServerReflectionResponse>>,
tonic::Status,
> {
@@ -248,7 +248,10 @@ pub mod server_reflection_server {
pub trait ServerReflection: Send + Sync + 'static {
/// Server streaming response type for the ServerReflectionInfo method.
type ServerReflectionInfoStream: futures_core::Stream<
Item = Result<super::ServerReflectionResponse, tonic::Status>,
Item = std::result::Result<
super::ServerReflectionResponse,
tonic::Status,
>,
>
+ Send
+ 'static;
@@ -257,7 +260,10 @@ pub mod server_reflection_server {
async fn server_reflection_info(
&self,
request: tonic::Request<tonic::Streaming<super::ServerReflectionRequest>>,
) -> Result<tonic::Response<Self::ServerReflectionInfoStream>, tonic::Status>;
) -> std::result::Result<
tonic::Response<Self::ServerReflectionInfoStream>,
tonic::Status,
>;
}
#[derive(Debug)]
pub struct ServerReflectionServer<T: ServerReflection> {
@@ -312,7 +318,7 @@ pub mod server_reflection_server {
fn poll_ready(
&mut self,
_cx: &mut Context<'_>,
) -> Poll<Result<(), Self::Error>> {
) -> Poll<std::result::Result<(), Self::Error>> {
Poll::Ready(Ok(()))
}
fn call(&mut self, req: http::Request<B>) -> Self::Future {