http icon indicating copy to clipboard operation
http copied to clipboard

feat: bring back `TryFrom<Bytes>` implementations

Open tesaguri opened this issue 4 years ago • 6 comments

This is mostly a revert of commit 4ce5e6a3a33c6548f885972db6f23450be18e133, but this does not bring back the error variants suffixed with Bytes (db9b1b9a76ce9c0b366fc6fff433ca4ca00571d1).

This also replaces usages of the internal from_shared associated functions with try_from.

Closes #459.

tesaguri avatar Mar 09 '21 07:03 tesaguri

Rebased onto master and updated the commit to retain from_shared functions for now to make the diff concise and easy to review.

tesaguri avatar Jul 18 '21 04:07 tesaguri

Rebased onto master and replaced the internal from_shared constructors with try_from in a separate commit.

Also, I've added a commit to remove the from_maybe_shared constructors because Hyper is at the release candidate stage now and these constructors do not seem to be intended for v1.0.

tesaguri avatar Aug 12 '23 03:08 tesaguri

@seanmonstar Sorry for the ping, but I believe this needs a decision, be it for or against, before the v1.0 release, since the PR contains a breaking change.

tesaguri avatar Nov 10 '23 11:11 tesaguri

What's the breakage? The removal of from_maybe_shared? If done after 1.0, that could just be hidden and deprecated, it's not bad, right?

seanmonstar avatar Nov 10 '23 11:11 seanmonstar

All right. Then, I'll revert the removal of from_maybe_shared if/when the crate hits v1.0 before merging the PR.

tesaguri avatar Nov 10 '23 11:11 tesaguri

Removed the commit to remove the from_maybe_shared constructors, and added a commit to deprecate and hide them from docs instead.

The CI failure is of the Nightly one and I haven't touched anything related to the Sealed trait, so it's not relevant to the patch, I guess?

tesaguri avatar Feb 14 '24 03:02 tesaguri