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.
I was about to bump the version and release. Given that we have added an error variant to an enum and a field to a struct it's technically a breaking change even if the feature is off by default... At least I think it should count as that 🤔 Because even if you as a direct user of
udp-over-tcp
does not activate the feature, a transitive dependency might....The fix for the error enum is easy, make them
#[non_exhaustive]
. I think this is a pretty good default for error enums to begin with. Because it allows adding more error cases without it being a breaking change...But what about the
Options
struct? I figured the best might be to also make it#[non_exhaustive]
and provide facilities for users to construct it without hitting compilation errors both if others enable thestatsd
feature OR if we add other optional fields later.We still need to bump the version in a breaking fashion after this PR (to 0.4.0) but these changes will allow us to stay on
0.4.x
after that even if we add optional option fields or error variants, something we cannot if we don't merge this PR.This change is