From 0c91317102ca56cda8da0163d00522e3a8169adb Mon Sep 17 00:00:00 2001 From: Klim Tsoutsman <32662194+TypicalFork@users.noreply.github.com> Date: Tue, 10 Aug 2021 02:48:40 +0000 Subject: [PATCH] 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. --- crates/bevy_app/src/schedule_runner.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/bevy_app/src/schedule_runner.rs b/crates/bevy_app/src/schedule_runner.rs index 9c80d237e6def..c3a897d5eced1 100644 --- a/crates/bevy_app/src/schedule_runner.rs +++ b/crates/bevy_app/src/schedule_runner.rs @@ -48,7 +48,7 @@ impl ScheduleRunnerSettings { /// Configures an App to run its [Schedule](bevy_ecs::schedule::Schedule) according to a given /// [RunMode] #[derive(Default)] -pub struct ScheduleRunnerPlugin {} +pub struct ScheduleRunnerPlugin; impl Plugin for ScheduleRunnerPlugin { fn build(&self, app: &mut App) {