fix(codec): Remove Default
bound on Codec
#894
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Motivation
I implemented a custom codec to use with a dynamic method where the types are not known at compile time. However this bound is mildly annoying since there's no sensible way to implement default
https://github.com/andrewhickman/grpc-client/blob/487c5409e78afef200a064c81ae1ade1b37c3c28/src/grpc/codec.rs#L63
Solution
The bound is never used so we can just remove it. I think this is technically a breaking change for consumers of the
Codec
trait, however anything usingProstCodec
, like generated code, still works.