-
-
Notifications
You must be signed in to change notification settings - Fork 3.8k
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
[Merged by Bors] - Refactor ResMut/Mut/ReflectMut to remove duplicated code #2217
[Merged by Bors] - Refactor ResMut/Mut/ReflectMut to remove duplicated code #2217
Conversation
ce7004e
to
ebd7849
Compare
Note: I can already tell the I'll have to change the |
I would appreciate if anyone had ideas for better names for |
|
I think |
Yep, that's the same thinking I had for chosing |
4ef4338
to
0e7999b
Compare
This feels likely to conflict with @BoxyUwU's relation PR (#1627). Would you be willing to help resolve merge conflicts with that @NathanSWard? It is likely to make implementing change detection for relations nicer though, so I personally think we should try and merge this in :) |
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.
I left some documentation nits, but once those are addressed this LGTM.
Sorry to ping you directly @cart but I would appreciate if you took a look at this :) |
@BoxyUwU how disruptive is this to relations? It seems relatively scoped to me. @NathanSWard: we've been discussing putting ecs work in "slow mode" to make merging the massive relations pr easier / cut down on boxy constantly needing to merge other people's work. Would you be willing to do the merge on boxy's relations branch to help out? Also, I'm now thinking |
looks like it would be pretty simple to rebase relations on top of, shouldn't hurt to merge :) |
Yep of course :)
Oh, I think I like that name more as well :) |
bors r+ |
`ResMut`, `Mut` and `ReflectMut` all share very similar code for change detection. This PR is a first pass at refactoring these implementation and removing a lot of the duplicated code. Note, this introduces a new trait `ChangeDetectable`. Please feel free to comment away and let me know what you think!
Pull request successfully merged into main. Build succeeded: |
…2217) `ResMut`, `Mut` and `ReflectMut` all share very similar code for change detection. This PR is a first pass at refactoring these implementation and removing a lot of the duplicated code. Note, this introduces a new trait `ChangeDetectable`. Please feel free to comment away and let me know what you think!
ResMut
,Mut
andReflectMut
all share very similar code for change detection.This PR is a first pass at refactoring these implementation and removing a lot of the duplicated code.
Note, this introduces a new trait
ChangeDetectable
.Please feel free to comment away and let me know what you think!