Skip to content

Optimize Extend when kind is a Vec - #849

Open
zphrs wants to merge 3 commits into
tokio-rs:masterfrom
zphrs:extend-specialization
Open

zphrs wants to merge 3 commits into
tokio-rs:masterfrom
zphrs:extend-specialization

Conversation

@zphrs

@zphrs zphrs commented Sep 9, 2026

Copy link
Copy Markdown

Fixes #848

@zphrs

zphrs commented Sep 9, 2026

Copy link
Copy Markdown
Author

Forgot to run tests and my code had a bug; I'm working on a fix currently.

@zphrs

zphrs commented Sep 9, 2026

Copy link
Copy Markdown
Author

I forgot to update length after extending because I based my code on the reserve() implementation. It's fixed now.

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.

Optimize Extend trait to have BytesMut::extend(&mut self, &[u8) compile to a memcpy when possible

1 participant