Skip to content

Commit

Permalink
chore(proxy/api-resolve): remove Default bounds
Browse files Browse the repository at this point in the history
see linkerd/linkerd2#8733 for more information.

see also, #3651 #3653, and #3654 for some related pull requests.

in hyper 1.x, `Incoming` bodies do not provide a `Default`
implementation. compare the trait implementations here:

* https://docs.rs/hyper/0.14.31/hyper/body/struct.Body.html#impl-Default-for-Body
* https://docs.rs/hyper/latest/hyper/body/struct.Incoming.html#trait-implementations

this commit removes `Default` bounds from `Resolve<S>`.

this means that in `linkerd-app`, we can invoke
`new_recover_default()` when using hyper 1.x (_see #3504_)

Signed-off-by: katelyn martin <[email protected]>
  • Loading branch information
cratelyn committed Feb 25, 2025
1 parent ea8a970 commit 9af770a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions linkerd/proxy/api-resolve/src/resolve.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ impl<S> Resolve<S>
where
S: GrpcService<BoxBody> + Clone + Send + 'static,
S::Error: Into<Error> + Send,
S::ResponseBody: Default + Body<Data = tonic::codegen::Bytes> + Send + 'static,
S::ResponseBody: Body<Data = tonic::codegen::Bytes> + Send + 'static,
<S::ResponseBody as Body>::Error: Into<Error> + Send,
S::Future: Send,
{
Expand All @@ -48,7 +48,7 @@ where
T: Param<ConcreteAddr>,
S: GrpcService<BoxBody> + Clone + Send + 'static,
S::Error: Into<Error> + Send,
S::ResponseBody: Default + Body<Data = tonic::codegen::Bytes> + Send + 'static,
S::ResponseBody: Body<Data = tonic::codegen::Bytes> + Send + 'static,
<S::ResponseBody as Body>::Error: Into<Error> + Send,
S::Future: Send,
{
Expand Down

0 comments on commit 9af770a

Please sign in to comment.