Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement a non-failing Response Builder. #442

Closed
wants to merge 5 commits into from

Conversation

kaj
Copy link

@kaj kaj commented Nov 7, 2020

Fixes one part of #330. Creating a Response with the builder pattern should not require handling errors unless opting in by using a try_-method (which returns a Result<Builder2>, not a Builder2 with an internal error state).

This is really a breaking change to response::Builder, but rather than suggesting a breaking change directly, I introduce an alternative response::Builder2. If this is accepted, the original Builder is deprecated, and in a later release Builder2 can be renamed back to Builder.

kaj added 5 commits April 28, 2021 18:50
Fixes hyperium#330.  Creating a Response with the builder pattern should not
require handling errors unless opting in by using a `try_`-method
(which returns a `Result<Builder2>`, not a `Builder2` with an interal
error state).

This is really a breaking change to `response::Builder`, but rather
than suggstig a breaking change directly, I introduce an alternative
`response::Builder2`.  If this is liked, the original `Builder` can be
deprecated, and in a later release `Builder2` can be renamed back to
`Builder`.
If this change is accpted, the old Builder should be deprecated
directly, so the new Builder2 can take its place as soon as
semver allows.
Try to make rustc 1.39.0 happy.
@kaj
Copy link
Author

kaj commented Apr 28, 2021

Replaced by #483 .

@kaj kaj closed this Apr 28, 2021
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.

1 participant