Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Merged by Bors] - Use default-implemented methods for IntoSystemConfig<> #7870

Closed

Conversation

joseph-gio
Copy link
Member

Objective

The trait IntoSystemConfig<> requires each implementer to repeat every single member method, even though they can all be implemented by just deferring to SystemConfig.

Solution

Add default implementations to most member methods.

@joseph-gio joseph-gio added A-ECS Entities, components, systems, and events C-Code-Quality A section of code that is hard to understand or change labels Mar 2, 2023
@alice-i-cecile alice-i-cecile requested review from maniwani and hymm March 2, 2023 14:24
@alice-i-cecile
Copy link
Member

Ping @geieredgar for review too if you have time :)

Copy link
Contributor

@geieredgar geieredgar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good!

@hymm hymm added the S-Ready-For-Final-Review This PR has been approved by the community. It's ready for a maintainer to consider merging it label Mar 2, 2023
Copy link
Member

@james7132 james7132 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Less code is better code.

bors r+

bors bot pushed a commit that referenced this pull request Mar 2, 2023
# Objective

The trait `IntoSystemConfig<>` requires each implementer to repeat every single member method, even though they can all be implemented by just deferring to `SystemConfig`.

## Solution

Add default implementations to most member methods.
@bors bors bot changed the title Use default-implemented methods for IntoSystemConfig<> [Merged by Bors] - Use default-implemented methods for IntoSystemConfig<> Mar 2, 2023
@bors bors bot closed this Mar 2, 2023
@joseph-gio joseph-gio deleted the default-system-config-impls branch March 2, 2023 17:38
Shfty pushed a commit to shfty-rust/bevy that referenced this pull request Mar 19, 2023
…7870)

# Objective

The trait `IntoSystemConfig<>` requires each implementer to repeat every single member method, even though they can all be implemented by just deferring to `SystemConfig`.

## Solution

Add default implementations to most member methods.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-ECS Entities, components, systems, and events C-Code-Quality A section of code that is hard to understand or change S-Ready-For-Final-Review This PR has been approved by the community. It's ready for a maintainer to consider merging it
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants