Repository navigation
refactor!: use core::alloc::Allocator trait - #761
morrisonlevi wants to merge 3 commits into
Conversation
|
So, first, thank you for showing interest in helping out with hashbrown! And you're right that we won't be merging this as-is. While we will be using the standard library As far I also would recommend any potential style or other minor improvements you make be submitted separately, since those I would be happy to merge. |
|
Thanks for the response! I understand the MSRV concern but I think there's a pretty easy solution: go to both 1.0 and 2.0. The 1.0 branch will use a conservative MSRV and be maintained for at least a year or so until other projects can bump their MSRV. Then 2.0 has the work based on the If that's not the plan... I'm interested in hearing the plan ^_^ |
|
Seems like a reasonable plan, although at least for now the main blocker to actually working more on the refactor is funding. I don't really want to commit to anything right now until there are more resources to actually work on this. |
First off, I don't expect you'll actually merge this, at least not to main. Maybe to some v0.19 branch or something.
The goal is to see what it takes to enable using the
core::alloc::Allocatortrait which is available on Rust 1.100, without depending on any external crate (such as a new allocator-api2 version).It's really not that much. The only apparenty difference between
allocator-api2::alloc::Allocatorandcore::alloc::Allocatoris theby_refmethod, which hashbrown doesn't use. I assume there's a good reason there for why core did not add this method; I have not caught up on all the reading yet. But it means migration is really quite easy.