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

Implement spare_capacity_mut #364

Merged
merged 1 commit into from
Dec 10, 2024
Merged

Implement spare_capacity_mut #364

merged 1 commit into from
Dec 10, 2024

Conversation

DaniPopes
Copy link
Contributor

Mirrors the implementation from Vec::spare_capacity_mut.

This is useful to write directly into the buffer after SmallVec::with_capacity, removing the overhead of the SmallVec model entirely when doing so.

Should I open a PR for v1 as well?

Mirrors the implementation from `Vec::spare_capacity_mut`.

This is useful to write directly into the buffer after `SmallVec::with_capacity`,
removing the overhead of the `SmallVec` model entirely when doing so.
Copy link
Collaborator

@mbrubeck mbrubeck left a comment

Choose a reason for hiding this comment

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

Thanks!

@mbrubeck
Copy link
Collaborator

Should I open a PR for v1 as well?

You don’t need to, but you may do this if you want to use this in a project that depends on smallvec v1.

@mbrubeck mbrubeck added this pull request to the merge queue Dec 10, 2024
Merged via the queue into servo:v2 with commit 9eacf68 Dec 10, 2024
6 checks passed
@DaniPopes DaniPopes deleted the spare-capacity branch December 10, 2024 23:58
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