Skip to content

WIP Replace AioCb::from_bytes with more generic from_boxed_slice #871

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

Closed
wants to merge 2 commits into from

Conversation

asomers
Copy link
Member

@asomers asomers commented Mar 5, 2018

Supporting the bytes crate was unnecessarily specific. This change
replaces from_bytes and from_bytes_mut with from_boxed_slice and
from_boxed_mut_slice, which can work with anything that implements
Borrow<[u8]> and BorrowMut<[u8]>, respectively.

@asomers asomers requested a review from Susurrus March 5, 2018 04:46
Cargo.toml Outdated
[target.'cfg(target_os = "dragonfly")'.build-dependencies]
gcc = "0.3"

[dev-dependencies]
bytes = { version="0.5.0", default_features = false }
Copy link
Member Author

Choose a reason for hiding this comment

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

The bytes crate is now only used for examples and tests. I could've removed it entirely, but since we explicitly supported it in version 0.10.0, I think we ought to use it in the examples as a kind of migration guide.

Supporting the bytes crate was unnecessarily specific.  This change
replaces from_bytes and from_bytes_mut with from_boxed_slice and
from_boxed_mut_slice, which can work with anything that implements
Borrow<[u8]> and BorrowMut<[u8]>, respectively.
@asomers
Copy link
Member Author

asomers commented Mar 5, 2018

Looks like using Cargo's patch feature only works some of the time. Builds are randomly passing or failing based on whether Cargo can download bytes. I'll fix it in the morning.

@asomers asomers self-assigned this Mar 6, 2018
@asomers
Copy link
Member Author

asomers commented Mar 6, 2018

This is not quite right; I'm working on a fix.

@asomers asomers changed the title Replace AioCb::from_bytes with more generic from_boxed_slice WIP Replace AioCb::from_bytes with more generic from_boxed_slice Mar 6, 2018
@asomers
Copy link
Member Author

asomers commented Mar 7, 2018

I'm combining this with PR #872

@asomers asomers closed this Mar 7, 2018
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.

1 participant