arcstr icon indicating copy to clipboard operation
arcstr copied to clipboard

Custom allocator support

Open thomcc opened this issue 3 years ago • 1 comments

We could define a custom trait (see how hashbrown does this) to support it prior to the unstable trait landing. This would (at the very least) allow testing allocation fallibility[^1], if nothing else.

That said, this is a non-trivial amount of work that seems a bit pointless at the moment.

[^1]: Admittedly, the amount of code that it would allow testing is very small, and the code in question is very straightforward — just a few lines which do nothing but return errors to their caller.

thomcc avatar Jan 02 '22 12:01 thomcc

I think it is not worth it to define a custom trait, but there's no reason we couldn't support core::alloc::Allocator once it is stable.

thomcc avatar May 07 '24 00:05 thomcc