hyperium / h2

HTTP 2.0 client & server implementation for Rust.
MIT License
1.36k stars 272 forks source link

Removed unnecessary `'static` & Unpin bounds from body generic #649

Closed gtsiam closed 1 year ago

gtsiam commented 1 year ago

Motivation

When proxying large requests, I want to be able to pass the request body straight through my server without loading all of it it in memory at once. This is currently very difficult due to the (seemingly) arbitrary 'static bound on Hyper's body generic. And so, I want to remove the 'static bounds for hyper 1.0, but before I can do that I need to remove them from here. (Will this require an h2 release before I can make the hyper patch?)

Changes

seanmonstar commented 1 year ago

It looks like the change here is actually quite small (the clippy stuff seems unrelated and could be a separate PR). I can't remember why the static bounds are there in the first place...

gtsiam commented 1 year ago

the clippy stuff seems unrelated and could be a separate PR

I still have a pr sitting in warp for more than a year, so I was expecting this to take ages too. But I'll keep it in mind for future contributions to hyper. Probably more effort than it's worth splitting it now. (But I can split it if it's necessary)

gtsiam commented 1 year ago

On second thought I'll just make it a separate pr, no need for the extra back and forth

seanmonstar commented 1 year ago

I still have a pr sitting in warp for more than a year, so I was expecting this to take ages too.

Sorry! I haven't been able to keep up with warp. My attention has been sucked up with hyper and its dependencies.

gtsiam commented 1 year ago

I still have a pr sitting in warp for more than a year, so I was expecting this to take ages too.

Sorry! I haven't been able to keep up with warp. My attention has been sucked up with hyper and its dependencies.

It's understandable, there's only so much time in a day. Regardless, I don't use warp much anymore. It's just that warp & mime is what shaped my expectation that this would be sitting here forever and pushed me to dump everything in one pr (not making it very easy to review I'll admit) - should've looked at other PRs a bit more closely before doing that.

That said, it might be worth looking into getting some maintainers for your undead projects or mark them as such at some point.