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

[Question] Is it reasonable to have cost efficient constructor for BytesMut? #594

Open
ileixe opened this issue Feb 1, 2023 · 0 comments

Comments

@ileixe
Copy link

ileixe commented Feb 1, 2023

Currently, BytesMut seems to require buffer allocation when converted from other types: https://docs.rs/bytes/latest/src/bytes/bytes_mut.rs.html#1172

Is there any reason not to provide allocation-free BytesMut constructor like https://docs.rs/bytes/latest/src/bytes/bytes.rs.html#843? (I'd like to use Box<[u8]> to create BytesMut as well. )

@ileixe ileixe changed the title [Question] Is it reasonable to have cost efficient [Question] Is it reasonable to have cost efficient constructor for BytesMut? Feb 1, 2023
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

No branches or pull requests

1 participant