-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
Merge _Reflect
and _WithRegistry
commands
#9680
base: main
Are you sure you want to change the base?
Conversation
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.
It's good to collapse these :) The AsDeref
+ ReadTypeRegistry
gymnastics don't seem particularly worth it to me without more context, but I won't block over that.
I would have preferred a solution where we implement |
Note that |
6f49d32
to
3d42430
Compare
While code was already effectively deduplicated, this further deduplicates it, by removing InsertReflect and RemoveReflect, since they were just specialized version of their _WithRegistry counterparts. - Add ReadTypeRegistry trait, implemented for AsRef<TypeRegistry> and AppTypeRegistry - Add default impl for ReflectCommandExt insert_reflect and remove_reflect methods - Remove InsertReflect and RemoveReflect in favor of InsertReflectWithRegistry<AppTypeRegistry> and equivalent.
3d42430
to
3baade9
Compare
Objective
While code was already effectively deduplicated, this further deduplicates it, by removing
InsertReflect
andRemoveReflect
, since they were just specialized version of their_WithRegistry
counterparts.Solution
ReadTypeRegistry
trait, implemented forAsRef<TypeRegistry>
andAppTypeRegistry
ReflectCommandExt
insert_reflect
andremove_reflect
methodsInsertReflect
andRemoveReflect
in favor ofInsertReflectWithRegistry<AppTypeRegistry>
and equivalent.