From 0fcd63ae8e9f9b474c30deae074e6787003b5b06 Mon Sep 17 00:00:00 2001 From: tottoto Date: Sat, 12 Oct 2024 18:41:25 +0900 Subject: [PATCH] chore(web): Relax GrpcWebCall error bound (#1993) --- tonic-web/src/call.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tonic-web/src/call.rs b/tonic-web/src/call.rs index 5e372349e..3c74e9bdb 100644 --- a/tonic-web/src/call.rs +++ b/tonic-web/src/call.rs @@ -1,4 +1,4 @@ -use std::error::Error; +use std::fmt; use std::pin::Pin; use std::task::{ready, Context, Poll}; @@ -162,7 +162,7 @@ impl GrpcWebCall where B: Body, B::Data: Buf, - B::Error: Error, + B::Error: fmt::Display, { // Poll body for data, decoding (e.g. via Base64 if necessary) and returning frames // to the caller. If the caller is a client, it should look for trailers before @@ -250,7 +250,7 @@ where impl Body for GrpcWebCall where B: Body, - B::Error: Error, + B::Error: fmt::Display, { type Data = Bytes; type Error = Status; @@ -339,7 +339,7 @@ where impl Stream for GrpcWebCall where B: Body, - B::Error: Error, + B::Error: fmt::Display, { type Item = Result, Status>;