-
-
Notifications
You must be signed in to change notification settings - Fork 251
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
fix compilation for feature enhanced-determinism #739
Conversation
I solved it similar to this impl too. It's annoying but it's good enough. Adding it to CI will help in future too. Best way to solve would be to make sure the API's match in parry, but it's not a huge problem (would be a huge problem if we had 100's of places of incompatibility). |
Best way would be to have indexmap's API match HashMap right ? I'll probably merge the fix without CI and think about CI next. But yeah in the meantime I was considering:
|
Maybe best way would be that, but for now best would be to quickly solve this indeed so we don't break anyone who uses master. |
#[cfg(feature = "enhanced-determinism")] | ||
let proxy_id = self.colliders_proxy_ids.shift_remove(removed); | ||
#[cfg(not(feature = "enhanced-determinism"))] | ||
let proxy_id = self.colliders_proxy_ids.remove(removed); |
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.
These are modified because of a deprecated warning:
warning: use of deprecated method `indexmap::map::IndexMap::<K, V, S>::remove`: `remove` disrupts the map order -- use `swap_remove` or `shift_remove` for explicit behavior.
--> crates/rapier3d/../../src/geometry/broad_phase_multi_sap/broad_phase_multi_sap.rs:234:62
|
234 | if let Some(proxy_id) = self.colliders_proxy_ids.remove(removed) {
| ^^^^^^
|
= note: `#[warn(deprecated)]` on by default
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.
👍
Fix fix compilation for feature enhanced-determinism #739
The regression was introduced by ImpulseJointSet::get_mut option to wake up connected bodies #716