Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove hyper::body::Chunk, replace with bytes::Bytes #1932

Closed
wants to merge 1 commit into from

Conversation

davidbarsky
Copy link
Contributor

Resolves #1931

This PR is a take at removing hyper::body::Chunk and replacing it with bytes::Bytes. I think that this PR should probably rely on bytes 0.5, but that hasn't been published yet. Additionally, there are still mentions of "chunk" in non-public facing code; that should probably be scrubbed.

cc: @abonander

@weihanglo
Copy link
Contributor

Some lines in h1::io benchmark need to remove crate::Chunk.

hyper/src/proto/h1/io.rs

Lines 926 to 929 in db1ba07

let mut write_buf = WriteBuf::<crate::Chunk>::new();
write_buf.set_strategy(WriteStrategy::Flatten);
b.iter(|| {
let chunk = crate::Chunk::from(s);

@lnicola
Copy link
Contributor

lnicola commented Nov 26, 2019

Nb. bytes 0.5 is now published.

@davidbarsky
Copy link
Contributor Author

@lnicola Thanks for the heads up!

@seanmonstar
Copy link
Member

We could move forward with this, thought there's some merge conflicts. I have a thing or two left that are distracting me, but I can fix this up after if you don't have time.

@seanmonstar
Copy link
Member

Fixed up here: #2048

@seanmonstar seanmonstar closed this Dec 6, 2019
@seanmonstar seanmonstar deleted the remove-chunk branch December 6, 2019 00:58
@davidbarsky
Copy link
Contributor Author

@seanmonstar Thanks for doing that! Sorry about that delay; I was pulled into an operation issue.

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.

Remove Chunk in favor of using Bytes directly
4 participants