Skip to content

Commit

Permalink
Use impl shorthand for plugin schedule config
Browse files Browse the repository at this point in the history
  • Loading branch information
Jondolf committed Jul 10, 2023
1 parent 8f06bab commit 02436bc
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/plugins/debug.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ impl PhysicsDebugPlugin {
/// Creates a [`PhysicsDebugPlugin`] with the schedule that is used for running the [`PhysicsSchedule`].
///
/// The default schedule is `PostUpdate`.
pub fn new<S: ScheduleLabel>(schedule: S) -> Self {
pub fn new(schedule: impl ScheduleLabel) -> Self {
Self {
schedule: Box::new(schedule),
}
Expand Down
2 changes: 1 addition & 1 deletion src/plugins/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ impl PhysicsPlugins {
/// Creates a [`PhysicsPlugins`] plugin group using the given schedule for running the [`PhysicsSchedule`].
///
/// The default schedule is `PostUpdate`.
pub fn new<S: ScheduleLabel>(schedule: S) -> Self {
pub fn new(schedule: impl ScheduleLabel) -> Self {
Self {
schedule: Box::new(schedule),
}
Expand Down
2 changes: 1 addition & 1 deletion src/plugins/prepare.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ impl PreparePlugin {
/// Creates a [`PreparePlugin`] with the schedule that is used for running the [`PhysicsSchedule`].
///
/// The default schedule is `PostUpdate`.
pub fn new<S: ScheduleLabel>(schedule: S) -> Self {
pub fn new(schedule: impl ScheduleLabel) -> Self {
Self {
schedule: Box::new(schedule),
}
Expand Down
2 changes: 1 addition & 1 deletion src/plugins/setup.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ impl PhysicsSetupPlugin {
/// Creates a [`PhysicsSetupPlugin`] using the given schedule for running the [`PhysicsSchedule`].
///
/// The default schedule is `PostUpdate`.
pub fn new<S: ScheduleLabel>(schedule: S) -> Self {
pub fn new(schedule: impl ScheduleLabel) -> Self {
Self {
schedule: Box::new(schedule),
}
Expand Down
2 changes: 1 addition & 1 deletion src/plugins/sync.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ impl SyncPlugin {
/// Creates a [`SyncPlugin`] with the schedule that is used for running the [`PhysicsSchedule`].
///
/// The default schedule is `PostUpdate`.
pub fn new<S: ScheduleLabel>(schedule: S) -> Self {
pub fn new(schedule: impl ScheduleLabel) -> Self {
Self {
schedule: Box::new(schedule),
}
Expand Down

0 comments on commit 02436bc

Please sign in to comment.