Skip to content

prost: relax codec Default bounds#2681

Open
WaterWhisperer wants to merge 1 commit into
grpc:masterfrom
WaterWhisperer:prost-default-bounds
Open

prost: relax codec Default bounds#2681
WaterWhisperer wants to merge 1 commit into
grpc:masterfrom
WaterWhisperer:prost-default-bounds

Conversation

@WaterWhisperer

Copy link
Copy Markdown

Manually implement Default for ProstEncoder and ProstDecoder so their message types do not need to implement Default.

Fixes: #2458

Motivation

ProstEncoder<T> and ProstDecoder<U> currently derive Default, which adds unnecessary T: Default / U: Default bounds.

Solution

Remove the derived Default impls for ProstEncoder and ProstDecoder, and replace them with manual impls that call Self::new(Default::default()).

Manually implement Default for ProstEncoder and ProstDecoder so their
message types do not need to implement Default.

Fixes: grpc#2458
@linux-foundation-easycla

linux-foundation-easycla Bot commented Jun 12, 2026

Copy link
Copy Markdown

CLA Signed
The committers listed above are authorized under a signed CLA.

  • ✅ login: WaterWhisperer / name: WaterWhisperer (44e291e)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

tonic-prost 0.14: ProstEncoder and ProstDecoder Default shouldn't require T: Default

1 participant