Skip to content

Conversation

LucioFranco
Copy link
Member

This changes Payload to be a trait alias of http_body::Body and seals Payload so that the only way to implement it is via http_body::Body. content_length was also removed in favor of the more flexible size hint api in http body.

If we're all happy with this I can cut a release of http body and push the cargo.toml change.

cc @seanmonstar @carllerche

Signed-off-by: Lucio Franco [email protected]

@seanmonstar
Copy link
Member

Looks good. I notice using the SizeHint is a little trickier... Would a set_exact and exact() -> Option which just handles setting/getting the lower and upper for us be helpful?

@LucioFranco
Copy link
Member Author

@seanmonstar yeah, I was thinking the same, will update http body then this PR.

@seanmonstar
Copy link
Member

With hyperium/http-body#14 merged, this can just use set_exact and exact instead.

@LucioFranco
Copy link
Member Author

@seanmonstar ok I applied the changes, and I think this is ready to go.

Copy link
Member

@seanmonstar seanmonstar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great!

@seanmonstar seanmonstar merged commit 79c32f8 into hyperium:master Aug 22, 2019
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.

3 participants