Skip to content

Commit

Permalink
Change definition of ScheduleRunnerPlugin (#2606)
Browse files Browse the repository at this point in the history
# 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.
  • Loading branch information
tsoutsman committed Aug 10, 2021
1 parent 49038d0 commit 0c91317
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion crates/bevy_app/src/schedule_runner.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 0c91317

Please sign in to comment.