Open
Conversation
Member
|
I don't understand the need to add an intermediate If we need it, we should find a better name for it |
Contributor
Author
The original
Yeah I don't love it |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Objective
bevy_extract#22852 , I foundAppLabelneeded multiple additional bounds ( the largest beingL: AppLabel + Default + Clone + Eq + Copy, in total 44 times) - this greatly reduces the readability of that PRe.g. I want to change
ExtractComponentPluginto be generic overL: AppLabel + Default, so that I can do the following:Eqis needed to byEntityEquivalentto makeCloneis needed to makeSyncToRenderWorldgenericCopyis needed to makePlugin for SyncWorldPlugingenericIf its desired, I can remove the extra constraints, and just have
pub trait AppLabel: AppLabelInterior {}as a placeholder, and add requirements as... required.AppLabeldirectly, butAppLabelis created bybevy_ecs::define_label!, and I was unable to add the above thereSolution
AppLabelInterioras a derived label, that have a super traitAppLabelwith the additional constraints.Testing