Skip to content

Commit

Permalink
chore(web): Remove unnecessary trait and lifetime bound
Browse files Browse the repository at this point in the history
  • Loading branch information
tottoto committed Sep 29, 2024
1 parent b42a36c commit 28705e8
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions tonic-web/src/service.rs
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ impl<S> GrpcWebService<S> {

impl<S> GrpcWebService<S>
where
S: Service<Request<BoxBody>, Response = Response<BoxBody>> + Send + 'static,
S: Service<Request<BoxBody>, Response = Response<BoxBody>>,
{
fn response(&self, status: StatusCode) -> ResponseFuture<S::Future> {
ResponseFuture {
Expand All @@ -67,9 +67,8 @@ where

impl<S> Service<Request<BoxBody>> for GrpcWebService<S>
where
S: Service<Request<BoxBody>, Response = Response<BoxBody>> + Send + 'static,
S::Future: Send + 'static,
S::Error: Into<BoxError> + Send,
S: Service<Request<BoxBody>, Response = Response<BoxBody>>,
S::Error: Into<BoxError>,
{
type Response = S::Response;
type Error = S::Error;
Expand Down Expand Up @@ -160,8 +159,8 @@ enum Case<F> {

impl<F, E> Future for ResponseFuture<F>
where
F: Future<Output = Result<Response<BoxBody>, E>> + Send + 'static,
E: Into<BoxError> + Send,
F: Future<Output = Result<Response<BoxBody>, E>>,
E: Into<BoxError>,
{
type Output = Result<Response<BoxBody>, E>;

Expand Down

0 comments on commit 28705e8

Please sign in to comment.