-
Notifications
You must be signed in to change notification settings - Fork 16
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 Arena::get2_mut #22
Conversation
I just implemented the unsafe version. It passed A quick note here: According to lifetime elision rules, |
Implementation is looking good, my comment is mostly a style nit. Can you also add an entry to |
Co-authored-by: Lucien Greathouse <me@lpghatguy.com>
Added!
|
Thanks! :D |
This PR adds
Arena::get2_mut
that returns mutable reference to two items of different indices at once.This PR closes #21.
Well... there's definitely some code gymnastics inside to implementing this thing in safe Rust. Is there a better way to implement this,
or maybe an unsafe implementation could be preferred?