hyper
hyper copied to clipboard
Rename the HttpBody export to Body
When the concrete Body
struct is removed, we can export the http_body::Body
trait as just Body
.
What would be the advantage in case of import both trait and struct?
The struct will be removed, as detailed in #2345.
I am just starting up with Hyper so would like to work on this task (if that's ok). By renaming and exporting the http_body::Body
trait as just Body
, I assume you are talking about updating the following:
https://github.com/hyperium/hyper/blob/84f6ae78d62f0ca3b85f86ea92887dc46ed9717e/src/body/mod.rs#L19-L23
But since the concrete Body
type is already exported as Body
, wouldn't that cause a conflict? Should I get rid of the concrete type export?
Yes, we'd need to finish removing parts of Body
, and renaming that. Then this one would be straightforward.
Is there a separate task that I can work on to remove parts of Body
?
@RajivTS The top comment in #2345 includes a list of tasks, and I tried to put them in order of unblocking the next one. Some are linked to specific issues, we can make more of them issues too.
This is no longer blocked, since Body
was renamed to Recv
as a stop-gap (#2963).
@seanmonstar Created PR to address this, would appreciate a review to understand if I missed something.