Skip to content

Conversation

@bmisiak
Copy link

@bmisiak bmisiak commented Apr 6, 2020

Hey 👋

It contained code identical to Vec::split_off. Is there a reason for not relying on the std method?

It contained code identical to [Vec::split_off](https://doc.rust-lang.org/src/alloc/vec.rs.html#1375-1389). Why not rely on std?
@jhgg
Copy link

jhgg commented Sep 19, 2020

There is a quirk here - perhaps we should add a comment, but it is not identical to Vec::split_off, as we size the split array to have the same capacity as the current array as we expect it to grow. Doing this will introduce extra unnecessary re-allocs.

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