http-rs / http-types

Common types for HTTP operations
https://docs.rs/http-types
Apache License 2.0
200 stars 84 forks source link

Stabilize upgrade #291

Closed yoshuawuyts closed 3 years ago

yoshuawuyts commented 3 years ago

Proposes to stabilize the upgrade submodule. I've included the changes suggested in https://github.com/http-rs/http-types/pull/287#discussion_r530688787, simplifying the internals. One downside of this, however, is that we remove the Clone derive. I'm not sure if this leads to a loss of functionality though, since derives are conditional, and we're now always boxing.

@jbr giving this a test run with your websockets tide patch would be much appreciated. That's what this API was designed for, and it allows us to gage whether this actually works as expected. Thanks!

Fishrock123 commented 3 years ago

If cloning is desirable, we could use dyn-clone.

Fishrock123 commented 3 years ago

To be fair, I don't think that Clone would have worked before anyways unless you had something that wasn't Connection.

jbr commented 3 years ago

to check if this branch integrates with the upgrades branch of async-h1, rebuild here: https://github.com/http-rs/async-h1/pull/159/checks?check_run_id=1465867869 — the current failure represents the missing changes in response.rs

yoshuawuyts commented 3 years ago

Annnnnnd https://github.com/http-rs/async-h1/pull/159/checks?check_run_id=1500647266 is passing! -- I think that means we can merge this!

Thanks for the review everyone, and thanks @pepoviola for the patch fix!

Merging!