mirror of
https://github.com/bevyengine/bevy
synced 2024-11-22 12:43:34 +00:00
Change definition of ScheduleRunnerPlugin
(#2606)
# Objective - Allow `ScheduleRunnerPlugin` to be instantiated without curly braces. Other plugins in the library already use the semicolon syntax. - Currently, you have to do the following: ```rust App::build() .add_plugin(bevy::core::CorePlugin) .add_plugin(bevy::app::ScheduleRunnerPlugin {}) ``` - With the proposed change you can do this: ```rust App::build() .add_plugin(bevy::core::CorePlugin) .add_plugin(bevy::app::ScheduleRunnerPlugin) ``` ## Solution - Change the `ScheduleRunnerPlugin` definition to use a semicolon instead of curly braces.
This commit is contained in:
parent
49038d03f5
commit
0c91317102
1 changed files with 1 additions and 1 deletions
|
@ -48,7 +48,7 @@ impl ScheduleRunnerSettings {
|
||||||
/// Configures an App to run its [Schedule](bevy_ecs::schedule::Schedule) according to a given
|
/// Configures an App to run its [Schedule](bevy_ecs::schedule::Schedule) according to a given
|
||||||
/// [RunMode]
|
/// [RunMode]
|
||||||
#[derive(Default)]
|
#[derive(Default)]
|
||||||
pub struct ScheduleRunnerPlugin {}
|
pub struct ScheduleRunnerPlugin;
|
||||||
|
|
||||||
impl Plugin for ScheduleRunnerPlugin {
|
impl Plugin for ScheduleRunnerPlugin {
|
||||||
fn build(&self, app: &mut App) {
|
fn build(&self, app: &mut App) {
|
||||||
|
|
Loading…
Reference in a new issue