-
Notifications
You must be signed in to change notification settings - Fork 93
feat: add get_disjoint_mut
#149
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
Conversation
Sorry for missing the low msrv. I added a |
3ccb96e
to
1fc6fee
Compare
Hmm, this is trickier than I thought. It seems like on 1.31 we get an error despite the code being I think I have a workaround by moving the implementation to a separate file which is not included on old rust versions. I'm very sorry for the repeated CI runs, I now tested this using |
Hmm, #150 removed the build script that this relied on. Since we are in the process of bumping MSRV anyways, would you consider bumping slightly further to MSRV 1.51 for const generics? Similar reasoning applies to it, it was released over 4 years ago (March 25, 2021), If this is acceptable I will gladly update this PR. |
@paolobarbolini @taiki-e thoughts? |
MSRV bump to 1.51 is okay. |
8e03579
to
d29ff8a
Compare
Awesome. The PR is rebased now. |
Any updates on this? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks.
Adds a
get_disjoint_mut
function similar to the ones onstd::slice
,std::collections::HashMap
or even crates like indexmap. I think its fair to say that the ecosystem is standardizing on this mechanism.I figured that there was no point in mirroring the more complicated API from
[T]::get_disjoint_mut
, as this crate cannot return slices of elemens anyways due to theEntry
wrapper enum.I therefore implemented the simpler version as precedented by hasmap and indexmap.