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

Fix: From<BytesMut> fo Vec<u8> implementation #554

Merged
merged 4 commits into from Jul 13, 2022

Conversation

NobodyXu
Copy link
Contributor

Avoid creating &mut Shared until Shared::is_unique returns true.

Signed-off-by: Jiahao XU Jiahao_XU@outlook.com

until `is_unique()` returns `true.`

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
Use `mem::take` instead of `mem::replace`

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
Copy link
Contributor

@Darksonn Darksonn left a comment

Choose a reason for hiding this comment

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

Looks good to me.

src/bytes_mut.rs Show resolved Hide resolved
@Darksonn Darksonn merged commit 10d1f6e into tokio-rs:master Jul 13, 2022
@NobodyXu NobodyXu deleted the fix/bytesmut-into-vec branch July 13, 2022 07:00
lelongg pushed a commit to lelongg/bytes that referenced this pull request Jan 9, 2023
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
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.

None yet

2 participants