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

Add Read from mutable slices #149

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft

Add Read from mutable slices #149

wants to merge 1 commit into from

Conversation

kaidokert
Copy link

Adding a Read implementation for mutable slice, which is useful in some contexts.

@kaidokert kaidokert requested a review from a team as a code owner December 30, 2024 02:36
@kaidokert kaidokert requested a review from haraldh December 30, 2024 02:36
@npmccallum
Copy link
Member

@kaidokert I support this in theory. Please make sure the tests pass.

@kaidokert
Copy link
Author

Oof, I was mistaken, this doesn't actually work for std, it's fine for no_std which i tested.

&mut [u8] doesn't implement std::io::Read, and thus the blanket Read implementation can't be used due to orphan rule. I don't know if there's a workaround at all for this, and diverging from std::io::Read isn't a great idea in the first place.

Converted to a draft, but i don't think there's a practical way to implement this and no great benefit.

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.

2 participants