mirror of
https://github.com/bevyengine/bevy
synced 2024-11-14 00:47:32 +00:00
7cb97852a5
# 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> |
||
---|---|---|
.. | ||
custom_loop.rs | ||
drag_and_drop.rs | ||
empty.rs | ||
empty_defaults.rs | ||
headless.rs | ||
headless_renderer.rs | ||
log_layers.rs | ||
log_layers_ecs.rs | ||
logs.rs | ||
no_renderer.rs | ||
plugin.rs | ||
plugin_group.rs | ||
return_after_run.rs | ||
thread_pool_resources.rs | ||
without_winit.rs |