forked from bevyengine/bevy
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
) # Objective ```rust // Currently: builder.add_after::<FooPlugin, _>(BarPlugin); // After this PR: builder.add_after::<FooPlugin>(BarPlugin); ``` This removes some weirdness and better parallels the rest of the `PluginGroupBuilder` API. ## Solution Define a helper method `type_id_of_val` to use in `.add_before` and `.add_after` instead of `TypeId::of::<T>` (which requires the plugin type to be nameable, preventing `impl Plugin` from being used). ## Testing Ran `cargo run -p ci lints` successfully. ## Migration Guide Removed second generic from `PluginGroupBuilder` methods: `add_before` and `add_after`. ```rust // Before: DefaultPlugins .build() .add_before::<WindowPlugin, _>(FooPlugin) .add_after::<WindowPlugin, _>(BarPlugin) // After: DefaultPlugins .build() .add_before::<WindowPlugin>(FooPlugin) .add_after::<WindowPlugin>(BarPlugin) ``` --------- Co-authored-by: BD103 <59022059+BD103@users.noreply.github.com>
- Loading branch information
1 parent
65aae92
commit 7cb9785
Showing
2 changed files
with
14 additions
and
9 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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