Skip to content

Add custom allocator support - #592

Open
bolshoytoster wants to merge 3 commits into
servo:v2from
bolshoytoster:v2
Open

Add custom allocator support#592
bolshoytoster wants to merge 3 commits into
servo:v2from
bolshoytoster:v2

Conversation

@bolshoytoster

@bolshoytoster bolshoytoster commented Sep 8, 2026

Copy link
Copy Markdown
Contributor

Closes #55.

This doesn't add support in the following APIs:
From
from_elem
Default
from_buf
from_buf_and_len
from_buf_and_len_unchecked
from_vec
from_raw_parts
splice
from_slice_copy
FromIterator

new, try_with_capacity and with_capacity now have _in counterparts, to match the standard library.

PartialEq does not support comparing two SmallVecs with different allocators (this is different from std Vec). This shouldn't matter too much, since you can just compare them as slices instead.

You also can't append two SmallVecs with different allocators, this matches std Vec.

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.

Support parametric allocators

1 participant