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

Remove initialize_resource<T> and friends #12307

Merged
merged 1 commit into from
Mar 5, 2024

Conversation

james7132
Copy link
Member

Objective

initialize_resource<T> and it's non-send equivalent is only used in two locations each. Fix #6285.

Solution

Remove them, replace their calls with their internals. Cut down on a bit of generic codegen.

This does mean that initialize_resource_internal is now pub(crate), but that's likely OK given that only one variant will remain once NonSend resources are removed from the World.

@james7132 james7132 added A-ECS Entities, components, systems, and events C-Code-Quality A section of code that is hard to understand or change labels Mar 4, 2024
@alice-i-cecile alice-i-cecile added S-Ready-For-Final-Review This PR has been approved by the community. It's ready for a maintainer to consider merging it and removed S-Ready-For-Final-Review This PR has been approved by the community. It's ready for a maintainer to consider merging it labels Mar 5, 2024
@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 5, 2024
@alice-i-cecile alice-i-cecile added this pull request to the merge queue Mar 5, 2024
Merged via the queue into bevyengine:main with commit ab6a5ca Mar 5, 2024
30 checks passed
spectria-limina pushed a commit to spectria-limina/bevy that referenced this pull request Mar 9, 2024
# Objective
`initialize_resource<T>` and it's non-send equivalent is only used in
two locations each. Fix bevyengine#6285.

## Solution
Remove them, replace their calls with their internals. Cut down on a bit
of generic codegen.

This does mean that `initialize_resource_internal` is now `pub(crate)`,
but that's likely OK given that only one variant will remain once
NonSend resources are removed from the World.
@james7132 james7132 deleted the yeet-initialize-resource branch March 10, 2024 07:27
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.

World has similarly named methods
3 participants